Skip to content

Commit

Permalink
http2: fix regression on upload EOF handling
Browse files Browse the repository at this point in the history
- a regression introduced by c9ec851
  where optimization of small POST bodies leads to a new code path
  for such uploads that did not trigger the "done sending" event
- add triggering this event for early "upload_done" situations

Fixes #11485
Closes #11487
Reported-by: Aleksander Mazur
  • Loading branch information
icing authored and bagder committed Jul 20, 2023
1 parent 2900c29 commit f9314f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/http.c
Expand Up @@ -3380,6 +3380,9 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
}
}

if(data->req.upload_done)
Curl_conn_ev_data_done_send(data);

if((conn->httpversion >= 20) && data->req.upload_chunky)
/* upload_chunky was set above to set up the request in a chunky fashion,
but is disabled here again to avoid that the chunked encoded version is
Expand Down

0 comments on commit f9314f3

Please sign in to comment.