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

Fixed EncodeJSONResponse body writing #1294

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

Conversation

kerma
Copy link

@kerma kerma commented Jul 10, 2024

EncodeJSONResponse is not writing body for status codes 100-199, 204, 304 according to https://datatracker.ietf.org/doc/html/rfc7230#section-3.3

Fixes #1291

@peterbourgon
Copy link
Member

Eh, that RFC is more of a suggestion than a requirement :)

@kerma
Copy link
Author

kerma commented Jul 11, 2024

@peterbourgon I'm a bit confused. I reported #1291 a while ago. In the response there you hinted that this should be fixed, as the EncodeJSONResponse is broken when the user implements a response with a 304 StatusCode.

Should I include just the 304 for that fix, or why you closed this one exactly?

@peterbourgon
Copy link
Member

Huh, me too apparently.

@peterbourgon peterbourgon reopened this Jul 11, 2024
@kerma
Copy link
Author

kerma commented Sep 3, 2024

@peterbourgon anything for me to do here? I guess the CI / Build issues are unrelated to this PR.

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.

http.EncodeJSONResponse body writing is not compatible with net/http
2 participants