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

Fix issue resulting in HTTP 200 being returned for request/responses using 100-continue that should actually return 201, 400, 500, etc. #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geofffranks
Copy link

HTTP 1xx's are interim status codes to be followed up by another. Prior to this change, if a response code for 100 Continue was written, any follow up call to WriteHeader was a no-op, and resulted in responses always receiving a 200 OK, even if WriteHeader was a 201, 404, 500, etc.

This fixes the issue seen in cloudfoundry/routing-release#409, which started occurring as of the negroni code change ec1c41c.

HTTP 1xx's are interim status codes to be followed up by another.
Prior to this change, if a response code for 100 Continue was written,
any follow up call to WriteHeader was a no-op, and resulted in responses
always receiving a 200 OK, even if WriteHeader was a 201, 404, 500, etc.
@geofffranks geofffranks changed the title Don't consider http 1xx codes to be Written Fix issue resulting in HTTP 200 being returned for request/responses using 100-continue that should actually return 201, 400, 500, etc. May 14, 2024
geofffranks added a commit to cloudfoundry/routing-release that referenced this pull request May 14, 2024
jrussett pushed a commit to cloudfoundry/routing-release that referenced this pull request May 14, 2024
@geofffranks
Copy link
Author

@jszwedko would you be able to take a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant