Harsha Narayana d4d1df03c9
fix content length mismatch in windows and other platform
The current implementation of `sanic` attempts to make use of `ujson` if
it's available in the system and if not, it will default to the inbuilt
`json` module provided by python.

The current implementation of `ujson` does not provide a mechanism to
provide a custom `seperators` parameter as part of the `dumps` method
invocation and the default behavior of the module is to strip all the
spaces around seperators such as `:` and `,`. This leads to an
inconsistency in the response length when the response is generated
using the `ujson` and in built `json` module provided by python.

To maintain the consistency, this commit overrides the default behavior
of the `dumps` method provided by the `json` module to add a `seperators`
argument that will strip the white spaces around these character like
the default behavior of `ujson`

This addresses the issue referenced in #1398

Signed-off-by: Harsha Narayana <harsha2k4@gmail.com>
2018-11-07 21:38:32 +05:30
..
2018-10-17 21:20:16 -07:00
2018-10-26 11:57:28 +03:00
2018-11-01 10:59:45 -06:00
2018-11-04 15:04:12 +10:00
2018-10-13 17:55:33 -07:00
2018-10-13 17:55:33 -07:00
2018-10-26 11:57:28 +03:00
2018-10-17 21:20:16 -07:00
2018-10-13 17:55:33 -07:00
2018-11-06 08:39:38 -06:00
2018-10-17 21:20:16 -07:00
2018-10-17 21:20:16 -07:00
2018-10-17 21:20:16 -07:00
2018-10-26 11:57:28 +03:00
2018-10-17 21:20:16 -07:00
2018-10-17 21:20:16 -07:00
2018-10-17 21:20:16 -07:00