Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/plug/conn.ex
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ defmodule Plug.Conn do
the `chunk/2` function.

HTTP/2 does not support chunking and will instead stream the response without a
transfer encoding. When using HTTP/1.1, the Cowboy adapter will stream the response
transfer encoding. When using HTTP/1.1, the underlying adapter will stream the response
instead of emitting chunks if the `content-length` header has been set before calling
`send_chunked/2`.
"""
Expand Down
7 changes: 6 additions & 1 deletion lib/plug/conn/adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ defmodule Plug.Conn.Adapter do

@doc """
Sends the given status, headers as the beginning of
a chunked response to the client.
a chunked response to the client. If the connection uses a
protocol (such as HTTP/2) which does not support chunked encoding,
the response should be sent in a streaming manner using the
protocol's framing method. Likewise if the passed headers include
a `content-length` header, the response should be streamed using
content length framing.

Webservers are advised to return `nil` as the sent_body,
since this function does not actually produce a body.
Expand Down