0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00

Add streaming without chunking for HTTP/1.1

If content-length is set in the response headers
we can skip chunked transfer-encoding.
This commit is contained in:
Eric Meadows-Jönsson 2018-05-16 13:28:49 +02:00 committed by Loïc Hoguin
parent 69451dd98d
commit f08f4610a0
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 140 additions and 38 deletions

View file

@ -45,7 +45,9 @@ more efficiently.
The streaming method varies depending on the protocol being
used. HTTP/2 will use the usual DATA frames. HTTP/1.1 will
use chunked transfer-encoding. HTTP/1.0 will send the body
use chunked transfer-encoding, if the content-length
response header is set the body will be sent without chunked
chunked transfer-encoding. HTTP/1.0 will send the body
unmodified and close the connection at the end if no
content-length was set.