HTTP request compression

前端 未结 3 660
傲寒
傲寒 2020-12-02 00:44

General Use-Case

Imagine a client that is uploading large amounts of JSON. The Content-Type should remain application/json because that

3条回答
  •  Happy的楠姐
    2020-12-02 01:16

    It appears [Content-Encoding] is not a valid request header.

    That is actually not quite true. As per RFC 2616, sec 14.11, Content-Encoding is an entity header which means it can be applied on the entities of both, http responses and requests. Through the powers of multipart MIME messages, even selected parts of a request (or response) can be compressed.

    However, webserver support for compressed request bodies is rather slim. Apache supports it to a degree via the mod_deflate module. It's not entirely clear to me if nginx can handle compressed requests.

提交回复
热议问题