aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy_http.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-18 13:21:36 +0100
committerLoïc Hoguin <[email protected]>2018-11-18 13:25:12 +0100
commit8d6d78575f64055be2d0992d8ccf802d9efa1faa (patch)
treeee95f8c365487a23afb8c10c225c1a2128a945fc /doc/src/manual/cowboy_http.asciidoc
parent417032a445926ea79c42e82be25b384f2d17d8ac (diff)
downloadcowboy-8d6d78575f64055be2d0992d8ccf802d9efa1faa.tar.gz
cowboy-8d6d78575f64055be2d0992d8ccf802d9efa1faa.tar.bz2
cowboy-8d6d78575f64055be2d0992d8ccf802d9efa1faa.zip
Add the chunked option for HTTP/1.1
It allows disabling the chunked transfer-encoding. It can also be disabled on a per-request basis, although it will be ignored for responses that are not streamed.
Diffstat (limited to 'doc/src/manual/cowboy_http.asciidoc')
-rw-r--r--doc/src/manual/cowboy_http.asciidoc10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/src/manual/cowboy_http.asciidoc b/doc/src/manual/cowboy_http.asciidoc
index 9ad1b27..3c33ab7 100644
--- a/doc/src/manual/cowboy_http.asciidoc
+++ b/doc/src/manual/cowboy_http.asciidoc
@@ -17,6 +17,7 @@ as a Ranch protocol.
[source,erlang]
----
opts() :: #{
+ chunked => boolean(),
connection_type => worker | supervisor,
env => cowboy_middleware:env(),
http10_keepalive => boolean(),
@@ -51,6 +52,13 @@ Ranch functions `ranch:get_protocol_options/1` and
The default value is given next to the option name:
+chunked (true)::
+
+Whether chunked transfer-encoding is enabled for HTTP/1.1 connections.
+Note that a response streamed to the client without the chunked
+transfer-encoding and without a content-length header will result
+in the connection being closed at the end of the response body.
+
connection_type (supervisor)::
Whether the connection process also acts as a supervisor.
@@ -140,7 +148,7 @@ Ordered list of stream handlers that will handle all stream events.
== Changelog
-* *2.6*: The `http10_keepalive`, `proxy_header` and `sendfile` options were added.
+* *2.6*: The `chunked`, `http10_keepalive`, `proxy_header` and `sendfile` options were added.
* *2.5*: The `linger_timeout` option was added.
* *2.2*: The `max_skip_body_length` option was added.
* *2.0*: The `timeout` option was renamed `request_timeout`.