]> git.ipfire.org Git - thirdparty/curl.git/commit
http2: fix EOF handling on uploads with auth negotiation
authorStefan Eissing <stefan@eissing.org>
Wed, 24 May 2023 16:48:16 +0000 (18:48 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 May 2023 06:26:18 +0000 (08:26 +0200)
commit5c58cb0212bcf63cce33a974906bf9905948b4bb
treefba527f438a6e39189b7665a61776874e4cac401
parent1fe8de85d391d750ad9996b9de4b886085c878b9
http2: fix EOF handling on uploads with auth negotiation

- doing a POST with `--digest` does an override on the initial request
  with `Content-Length: 0`, but the http2 filter was unaware of that
  and expected the originally request body. It did therefore not
  send a final DATA frame with EOF flag to the server.
- The fix overrides any initial notion of post size when the `done_send`
  event is triggered by the transfer loop, leading to the EOF that
  is necessary.
- refs #11194. The fault did not happen in testing, as Apache httpd
  never tries to read the request body of the initial request,
  sends the 401 reply and closes the stream. The server used in the
  reported issue however tried to read the EOF and timed out on the
  request.

Reported-by: Aleksander Mazur
Fixes #11194
Cloes #11200
lib/http2.c
tests/http/test_07_upload.py
tests/http/test_14_auth.py [new file with mode: 0644]
tests/http/testenv/httpd.py