Skip to content

SocketsHttpHandler does not check for Transfer-Encoding: chunked on response properly  #63053

Closed
@geoffkizer

Description

@geoffkizer

For every HTTP/1.1 response, we need to check for Transfer-Encoding: chunked. We do this by calling HttpHeaders.ContainsParsedValue.

This check will succeed if "chunked" appears anywhere in the Transfer-Encoding list. However, Transfer-Encodings are ordered and so the check should only succeed if "chunked" is the final Transfer-Encoding value.

Note that sending "chunked" as a non-final Transfer-Encoding value is invalid server behavior, so we are only doing this incorrectly when the server is misbehaving. Still, we should adhere to the RFC here.

Relevant RFC: https://www.rfc-editor.org/rfc/rfc7230.html#section-3.3.1

Metadata

Metadata

Assignees

Labels

area-System.Net.Httpbugin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions