Skip to content

FIX: mimic django rest framework default behaviour on None#9

Merged
brianjbuck merged 1 commit intobrianjbuck:masterfrom
jsmolina:fix/renderer
May 6, 2021
Merged

FIX: mimic django rest framework default behaviour on None#9
brianjbuck merged 1 commit intobrianjbuck:masterfrom
jsmolina:fix/renderer

Conversation

@jsmolina
Copy link
Contributor

@jsmolina jsmolina commented May 6, 2021

This Pull request fixes: #8

Empty reply (like http 204 status code) caused wrong behaviour, generating issues with some strict proxies.

It serialized None as 'null', causing header Content-Length to equal 4, but at the same time returning an empty body at django level.

@jsmolina jsmolina changed the title mimic django rest framework default behaviour on None FIX: mimic django rest framework default behaviour on None May 6, 2021
Copy link
Owner

@brianjbuck brianjbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @jsmolina!

@brianjbuck brianjbuck merged commit f15ff20 into brianjbuck:master May 6, 2021
@jsmolina jsmolina deleted the fix/renderer branch May 7, 2021 06:12
@jameschristopher
Copy link

Thank you! 👍

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.

ORJSONRenderer is causing malformed response on 204 replies

3 participants