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
JSONRenderer does not return a valid json response when data=None
#6026
Comments
Just a quick clarification.. I may not be recreating your exact setup, but a quick, manual test shows that the As to the empty response, I'm inclined to agree with @kltdwrds. I don't know if the spec allows an empty body, however, both JavaScript's That is to say, On second thought, the current behavior makes sense. Although |
data=None
data=None
hmm I'm using
Not sure where the |
It looks like the |
Our current behavior for |
Steps to reproduce
Expected behavior
A valid json response body like
null
or{}
Actual behavior
No
Content-Type
header set and an empty response is returned - particularly painful when making requests with jquery'sajax()
. It throws an parseerror and rejects the promise on a success response with an empty body. See here https://stackoverflow.com/a/6186905PR here: #6027
The text was updated successfully, but these errors were encountered: