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
This commit is contained in:
Stefan Eissing 2023-04-20 11:59:52 +02:00 committed by Daniel Stenberg
parent a8706fd8d0
commit 20252b77bc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;