Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEAD response body tolerance #13732

Closed
wants to merge 1 commit into from

Conversation

icing
Copy link
Contributor

@icing icing commented May 21, 2024

  • as reported in HEAD requests fail with: HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR #13725, some servers wrongly send body bytes in responses to a HEAD request. This used to be tolerated in curl 8.4 and before and leads to failed transfers in newer versions.
  • restore previous behaviour for HTTP/1.1 and HTTP/2:
    • 1.1: do not add 'Transfer-Encoding' writers from HEAD responses. RFC 9112 says they do not apply.
    • 2: when the transfer expects 'no_body', to not report stream resets as error when all response headers have been received.

- as reported in curl#13725, some servers wrongly send body bytes in
  responses to a HEAD request. This used to be tolerated in curl
  8.4 and before and leads to failed transfers in newer versions.
- restore previous behaviour for HTTP/1.1 and HTTP/2:
  * 1.1: do not add 'Transfer-Encoding' writers from HEAD
    responses. RFC 9112 says they do not apply.
  * 2: when the transfer expects 'no_body', to not report stream
    resets as error when all response headers have been received.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

1 participant