-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Symfony Response on 416 HTTP Exception #13465
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
Comments
There was recently a patch that dealt with adding an invalid Content-Range header on non-safe request (like POST, PUT etc). Are you fetching the page through a GET request? |
@DmitryKmita would you mind to provide code to reproduce your issue? |
This is a GET request.
and make simple CURL request from CLI to this action:
|
Not quite, the spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) says that a If you did not specify a content-range, but added an
I can check to see if I can reproduce this on both Symfony versions though. |
This has been recently fixed by #18080 |
Closing as I can't reproduce getting an empty response when throwing the |
Version of symfony: 2.6.3
Version of cUrl: 7.19.7
If I send a request to an action that throws 416 Exception the curl body is empty.
In ~2.5 version of the symfony there was no such problem.
Because of this problem if you have a test that validates the error page and uses cUrl to parse the DOM- it will get an error "The current node list is empty".
By specs in 416 HTTP error response should have:
Content-Range header.
I compared the response between ~2.5 version and 2.6.3 and found that in 2.6.3 I don't get
Transfer-Encoding: chunked header, maybe this is the reason why response body is empty.
The text was updated successfully, but these errors were encountered: