Skip to content

Conversation

@armandmgt
Copy link

@armandmgt armandmgt commented May 20, 2023

PR Type

Bug Fix for awc

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

As noted in #2287 response body should be read until connection is closed when neither Transfer-Encoding nor Content-Length are specified in HTTP/1.1 (item 7 in https://www.rfc-editor.org/rfc/rfc7230#section-3.3.3).
In order not to break any current tests I added a check for the presence of the Connection: close header (which is not required by the spec).
For reference this is how go's standard library is doing it: https://github.com/golang/go/blob/aeb0644bd33e67f24e2411a651ac9ff72ddc96b4/src/net/http/transfer.go#L548

@armandmgt
Copy link
Author

Not sure this is really relevant / up-to-date
Feel free to re-open if needed !

@armandmgt armandmgt closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants