]> git.ipfire.org Git - thirdparty/curl.git/commit
http2: fix handling of RST and GOAWAY to recognize partial transfers
authorStefan Eissing <stefan@eissing.org>
Mon, 6 Mar 2023 16:16:01 +0000 (17:16 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Mar 2023 22:58:24 +0000 (23:58 +0100)
commit48cd032623abac34409fcf35d1bed6f90f228fd2
tree296e55c75e4b7c9a6efba87c398bb14ca3354432
parentb0564c1d545d74da0c95665357d69d2bd2da04ae
http2: fix handling of RST and GOAWAY to recognize partial transfers

- a reset transfer (HTTP/2 RST) did not always lead to the proper
  error message on receiving its response, leading to wrong reports
  of a successful transfer
- test_05_02 was able to trigger this condition with increased transfer
  count. The simulated response errors did not carry a 'Content-Length'
  so only proper RST handling could detect the abort
- When doing such transfers in parallel, a connection could enter the
  state where
  a) it had been closed (GOAWAY received)
  b) the RST had not been "seen" for the transfer yet
  or c) the GOAWAY announced an error and the last successful
  stream id was not checked against ongoing transfers

Closes #10693
lib/http2.c
tests/http/test_05_errors.py