Skip to content

Client GET requests with transfer-encoding are wrongly stripped #1925

Closed
@seanmonstar

Description

@seanmonstar

The client wrongly strips transfer-encoding: chunked from GET requests, thinking that GET requests shouldn't have payloads. However, that's not explicitly true:

A payload within a GET request message has no defined semantics;
sending a payload body on a GET request might cause some existing
implementations to reject the request.

The original implementation was trying to protect from empty Body::wrap_stream(some_empty_stream)s automatically adding transfer-encoding: chunked to a GET request.

The fix should probably still protect against that, but if the transfer-encoding header has been explicitly set on the Request, it should be forwarded as-is.

Metadata

Metadata

Assignees

Labels

A-http1Area: HTTP/1 specific.C-bugCategory: bug. Something is wrong. This is bad!E-easyEffort: easy. A task that would be a great starting point for a new contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions