Age | Commit message (Collapse) | Author |
|
It is now tested both via cowboy_req:read_body and
via cowboy_req:cast.
Removes a bad example from the guide of body reading
with period of infinity, which does not work.
|
|
The read buffer was changed into an iovec to avoid doing
too many binary concatenations and allocations.
Decompression happens transparently: when decoding gzip,
the content-encoding header is removed (we only decode
when "gzip" is the only encoding so nothing remains).
We always add a content_decoded key to the Req object.
This key contains a list of codings that were decoded,
in the reverse order in which they were. Currently it
can only be empty or contain <<"gzip">> but future
improvements or user handlers may see it contain more
values.
The option to disable decompression was renamed to
decompress_enabled and defaults to true.
It is no longer possible to enable/disable decompression
in the middle of reading the body: this ensures that the
data we pass forward is always valid.
Various smaller improvements were made to the code,
tests and manual pages.
|
|
|
|
LH: I have added a test that does both hibernate and timeout
and fixed a related issue. I also tweaked the docs and tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Verb agreement error "The request process executes
middlewares which, by default, including the router
and then the execution of handlers." -> "The request
process executes middlewares. By default, the request
process executes the router and then the handlers."
Adverbial clause at beginning of sentence needs comma
"By default Cowboy comes..." -> "By default, Cowboy comes..."
|
|
Thanks Tamir Halperin for pointing this out.
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reduces the number of times we need to ask for more packets,
and as a result we get a fairly large boost in performance,
especially with HTTP/1.1.
Unfortunately this makes Cowboy require at least Erlang/OTP 21.3+
because the ssl application did not have active,N. For simplicity
the version required will be Erlang/OTP 22+.
In addition this change improves hibernate handling in
cowboy_websocket. Hibernate will now work for HTTP/2 transport
as well, and stray or unrelated messages will no longer cancel
hibernate (the process will handle the message and go back into
hibernation).
Thanks go to Stressgrid for benchmarking an early version of this
commit: https://stressgrid.com/blog/cowboy_performance_part_2/
|
|
|
|
|
|
This allows changing the normal exit reason of Websocket
processes, providing a way to signal other processes of
why the exit occurred.
|
|
We now stop reading from the socket unless asked to,
when we reach the request body. The option
initial_stream_flow_size controls how much data
we read without being asked, as an optimization.
We may also have received additional data along
with the request headers.
This commit also reworks the timeout handling for HTTP/1.1
because the stray timeout message was easily reproducible
after implementing the flow control. The issue should be
gone for good this time.
|
|
|
|
Also link from the guide to manual pages.
|
|
The old interface with ok|reply|stop tuples is deprecated.
|
|
This required moving around a lot of things so hopefully I
did not add errors while doing so. Only time will tell.
Also add the 415 that can result from content_types_accepted.
|
|
When the method is PUT we do not check the location header.
|
|
|
|
|
|
Noun 'setup' -> verb phrase 'set up'
|
|
|
|
|
|
|
|
|
|
|
|
Updates Cowlib to 2.7.2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
This is a convention that indicates the callback will never
be called, for example because the methods HEAD or GET are
not accepted.
|
|
|
|
|
|
|