summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eissing <stefan@eissing.org>2023-04-20 11:59:52 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-04-24 13:40:47 +0200
commit20252b77bcef114c4d4a9bed571f314fd669c7a3 (patch)
tree3a3a2fd081b7a2d946d747905659ee5dc126937d
parenta8706fd8d040b554dfa6bd4af2481d40150ed327 (diff)
downloadcurl-20252b77bcef114c4d4a9bed571f314fd669c7a3.tar.gz
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
-rw-r--r--lib/vquic/curl_quiche.c6
1 files changed, 6 insertions, 0 deletions
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;