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

Strip Content-Length: 0 from responses that should not have a Content-Length #43417

Open
wants to merge 1 commit into
base: release/7.0-rc1
Choose a base branch
from

Conversation

adityamandaleeka
Copy link
Member

@adityamandaleeka adityamandaleeka commented Aug 19, 2022

We made a change (earlier in RC1, #43103) that tightened up Kestrel's Content-Length handling. Part of the change made it so that we throw if a Content-Length is set on responses that shouldn't have a Content-Length (1xx, 204 responses, or any 2xx responses to a CONNECT request).

This change keeps that behavior for nonzero values of Content-Length. If the Content-Length is present but it's zero, we will now just remove it instead of throwing, since its absence is semantically equivalent.

This is the remainder of the RC1 fix for #43316

@msftbot msftbot bot added the area-runtime label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant