Age | Commit message (Collapse) | Author |
|
|
|
|
|
If content-length is set in the response headers
we can skip chunked transfer-encoding.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This depends on changes in Cowlib that are only available on
master.
|
|
Sending data of size 0 with the fin flag set resulted in nothing
being sent to the client and still considering the response to
be finished for HTTP/1.1.
For both HTTP/1.1 and HTTP/2, the final chunk of body that is
sent automatically by Cowboy at the end of a response that the
user did not properly terminate was not passing through stream
handlers. This resulted in issues like compression being incorrect.
Some tests still fail under 20.1.3. They are due to recent zlib
changes and should be fixed in a future patch release. Unfortunately
it does not seem to be any 20.1 version that is safe to use for
Cowboy, although some will work better than others.
|
|
The 100 continue response will only be sent if the client
has not sent the body yet (at all), if the connection is
HTTP/1.1 or above and if the user has not sent it yet.
The 100 continue response is sent when the user calls
read_body and it is cowboy_stream_h's responsibility
to send it. This means projects that don't use the
cowboy_stream_h stream handler will need to handle the
expect header themselves (but that's okay because they
might have different considerations than normal Cowboy).
|
|
User code can now send as many 1xx responses as necessary.
|
|
To obtain the local socket ip/port and the client TLS
certificate, respectively.
|
|
I have amended a lot of changes from the original commit
to make it behave as expected, including returning a 400
error. LH
|
|
|
|
When the request process exits with a {request_error, Reason, Human}
exit reason, Cowboy will return a 400 status code instead of 500.
Cowboy may also return a more specific status code depending on
the error. Currently it may also return 408 or 413.
This should prove to be more solid that looking inside the stack
trace.
|
|
|
|
This will result in no data being sent. It's simply easier to
do this than to have to handle 0 size cases in user code.
|
|
|
|
Existing tests pass. A number of things remain to be done.
Has only been tested with Gun so far. Feedback welcome!
|
|
Maps make more sense because the keys are unique.
|
|
|
|
Currently marked as experimental because it can't be tweaked
(just enabled/disabled) and because it is not documented yet.
|
|
|
|
|
|
|
|
|
|
This is a large commit. The cowboy_req interface has largely
changed, and will change a little more. It's possible that
some examples or tests have not been converted to the new
interface yet. The documentation has not yet been updated.
All of this will be fixed in smaller subsequent commits.
Gotta start somewhere...
|
|
|
|
Along with more cowboy_req tests.
This commit also removes cowboy_req:url/1 and cowboy_req:host_url/1
in favor of the much more powerful new set of functions.
|
|
|