Skip to content

Gzip makes the response larger #18

@eldad87

Description

@eldad87

Hi,
I noticed that Gzip is applied to all requests. In some cases, we better off Gzip. For example, a very shot textual response with Gzip might get twice the size. For example:

Without encoding:

curl -i http://localhost:8000/ping
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Mon, 22 Oct 2018 16:37:12 GMT
Content-Length: 18

{"message":"pong"}

With encoding:

curl -H "Accept-Encoding: gzip" -i http://localhost:8000/ping 2>/dev/null --output -
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Vary: Accept-Encoding
Date: Mon, 22 Oct 2018 16:39:07 GMT
Content-Length: 42

����V�M-.NLOU�R*��KW�����b`k�el

Please advise,
Thanks!

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