HTTP 1.1 - Can a client request that a transmission not be "chunked"?

Is it possible for the HTTP 1.1 client to set a header value that indicates that responses to requests should not be flagged? Or is this the only way to prevent this from sending an HTTP request? I tried searching all over the world, but all I can find are ways to disable portable transfers on HTTP 1.1 servers, so I assume this is not possible for the client, but I thought I was asking anyway.

+4
source share
2 answers

In HTTP (starting with HTTP / 1.1), recipients MUST support encoded encoding. See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-26.html#rfc.section.4.1.p.4 .

+4
source

To get the Content-Length in bytes instead of chunked inside the response with HTTP 1.1, you must set the Content-Length header and its size (long or int) based on the file that you expect inside the response. it will be good for a long time, so it can take care of a small as well as a large file size. The answer will be HttpServletResponse. response.addHeader (Content-Length, Long.toString ()); Thank,

-1
source

Source: https://habr.com/ru/post/1541370/


All Articles