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

Response body not possible (null) if HTTP status code is 304 (not modified). #1267

Open
fsilkswan opened this issue Sep 16, 2022 · 2 comments

Comments

@fsilkswan
Copy link

Hi there,

I've come to notice that it is not possible to deliver a response body to an arbitrary client in case the HTTP status code is set to 304 in the Response object.
Client's will not receive any content, even the Route returns a String and/or the body field of the Response is set.

The other 3xx codes seem to allow a response body though.

Is there a reason why 304 has a special treatment regarding the response body?

Kind regards
-Ferdinand-

@qrhfz
Copy link

qrhfz commented May 19, 2023

MDN says "The response must not contain a body "
it's the http standard
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304

@fsilkswan
Copy link
Author

I see, thanks for your time!

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

No branches or pull requests

2 participants