d4d1df03c9
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> |
||
---|---|---|
.. | ||
certs | ||
performance | ||
static | ||
conftest.py | ||
test_bad_request.py | ||
test_blueprints.py | ||
test_config.py | ||
test_cookies.py | ||
test_create_task.py | ||
test_custom_protocol.py | ||
test_dynamic_routes.py | ||
test_exceptions_handler.py | ||
test_exceptions.py | ||
test_keep_alive_timeout.py | ||
test_logging.py | ||
test_middleware.py | ||
test_multiprocessing.py | ||
test_named_routes.py | ||
test_payload_too_large.py | ||
test_redirect.py | ||
test_request_cancel.py | ||
test_request_data.py | ||
test_request_stream.py | ||
test_request_timeout.py | ||
test_requests.py | ||
test_response_timeout.py | ||
test_response.py | ||
test_routes.py | ||
test_server_events.py | ||
test_signal_handlers.py | ||
test_static.py | ||
test_url_building.py | ||
test_url_for_static.py | ||
test_utf8.py | ||
test_vhosts.py | ||
test_views.py | ||
test_worker.py |