mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50:24 +00:00
Replace init_stream/5 with stream_body/2
This allows us to change the max chunk length on a per chunk basis instead of for the whole stream. It's also much easier to use this way even if we don't want to change the chunk size.
This commit is contained in:
parent
66f7c15c4d
commit
ce1d8862c0
2 changed files with 39 additions and 34 deletions
|
@ -104,9 +104,9 @@ and `body_qs/2` will return `{error, badlength}`. If the request
|
|||
contains chunked body, `body/1`, `body/2`, `body_qs/1`
|
||||
and `body_qs/2` will return `{error, chunked}`.
|
||||
If you get either of the above two errors, you will want to
|
||||
handle the body of the request using `stream_body/1` and
|
||||
`skip_body/1`, with the streaming process optionally
|
||||
initialized using `init_stream/4` or `init_stream/5`.
|
||||
handle the body of the request using `stream_body/1`,
|
||||
`stream_body/2` and `skip_body/1`, with the streaming process
|
||||
optionally initialized using `init_stream/4`.
|
||||
|
||||
Multipart request body
|
||||
----------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue