From 20252b77bcef114c4d4a9bed571f314fd669c7a3 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 20 Apr 2023 11:59:52 +0200 Subject: HTTP3/quiche: terminate h1 response header when no body is sent - fixes a failure in test2501 where a response without body was missing the final empty line Closes #11003 --- lib/vquic/curl_quiche.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/vquic/curl_quiche.c b/lib/vquic/curl_quiche.c index 6f2736d66..1a6838b01 100644 --- a/lib/vquic/curl_quiche.c +++ b/lib/vquic/curl_quiche.c @@ -527,6 +527,12 @@ static CURLcode h3_process_event(struct Curl_cfilter *cf, case QUICHE_H3_EVENT_FINISHED: DEBUGF(LOG_CF(data, cf, "[h3sid=%"PRId64"][FINISHED]", stream3_id)); + if(!stream->resp_hds_complete) { + result = write_resp_raw(cf, data, "\r\n", 2); + if(result) + return result; + stream->resp_hds_complete = TRUE; + } stream->closed = TRUE; streamclose(cf->conn, "End of stream"); break; -- cgit v1.2.1