Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JSONRenderer modifies data when status_code is 204 NO CONTENT #339

Closed
@dig3

Description

JSONRenderer modifies the data to be renedered, from None to {'data': None} when response.status_code is 204.

From HTTP's RFC I see that:

All responses to the HEAD request method
MUST NOT include a message-body, even though the presence of entity-
header fields might lead one to believe they do. All 1xx
(informational), 204 (no content), and 304 (not modified) responses
MUST NOT include a message-body

This behavior made some clients to crash when the response stauts is 204 NO CONTENT and the header Content-Length is different from 0 (in this case 13 since the response body is {"data":null}).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /