Age | Commit message (Collapse) | Author |
|
|
|
Fixes #839 when 'Connection: Keep-Alive' wasn't sent in a HTTP/1.0
response. Now the usage of 'Connection' header is consistent with
current protocol version: when this header is not specified explicitly
in the response, HTTP/1.0 implies 'Connection: close' and HTTP/1.1
implies 'Connection: Keep-Alive'. So if current 'Connection' value
matches the default value of current protocol, we won't state obvious
fact in the response; and vice versa.
Amended to fix and improve tests, and revert the variable name
change from HTTP11Headers to StdHeaders. I think it's still good
to leave it as is because it's not really a standard header for
HTTP/1.0, and it's gone from HTTP/2 entirely.
|
|
into 1.0.x
|
|
This is what I get for merging blindly!
and
Fix a compile error introduced in previous commit
(cherry-pick)
|
|
|
|
|
|
into 1.0.x
|
|
|
|
|
|
|
|
At present, the resulting stacktrace will be misleading about where the
underlying error occurred.
|
|
|
|
|
|
|
|
This should fix an issue with DEPS on FreeBSD.
|
|
|
|
|
|
We should be doing a case insensitive comparison to be correct,
but this is more expensive. Almost all clients send lowercase,
this patch fixes handling of the aws/aws-sdk-php client which
sends uppercase, and no known client sends mixed case so I am
holding back on the more expensive solution for the moment.
|
|
|
|
Only go for keep-alive if they submit a 'connection: keep-alive' header
in the request, keep behaviour the same otherwise.
The new RFC 7230 (http://tools.ietf.org/html/rfc7230#section-6.3)
states:
If the received protocol is HTTP/1.0, the "keep-alive" connection
option is present, the recipient is not a proxy, and the recipient
wishes to honor the HTTP/1.0 "keep-alive" mechanism, the
connection will persist after the current response;
Even though clients are discouraged from doing so in Appendix A.1.2
(http://tools.ietf.org/html/rfc7230#appendix-A.1.2)
|
|
|
|
|
|
|
|
This is a first step to improve the HTTP status codes returned
by Cowboy on crashes. We will tweak it over time.
Also fixes a small bug where two replies may have been sent
when using loop handlers under rare conditions.
|
|
A fix for a possible bug has been made to the original patch.
|
|
422 is undefined for HTTP and interpreted as 400.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This would allow us to override them without messing up the body,
and would make it usable with the static file handler for example.
Experimental at this point.
|
|
The options were added to allow developers to fix timeout
issues when reading large bodies. It is also a cleaner and
easier to extend interface.
This commit deprecates the functions init_stream, stream_body
and skip_body which are no longer needed. They will be removed
in 1.0.
The body function can now take an additional argument that is a
list of options. The body_qs, part and part_body functions can
too and simply pass this argument down to the body call.
There are options for disabling the automatic continue reply,
setting a maximum length to be returned (soft limit), setting
the read length and read timeout, and setting the transfer and
content decode functions.
The return value of the body and body_qs have changed slightly.
The body function now works similarly to the part_body function,
in that it returns either an ok or a more tuple depending on
whether there is additional data to be read. The body_qs function
can return a badlength tuple if the body is too big. The default
size has been increased from 16KB to 64KB.
The default read length and timeout have been tweaked and vary
depending on the function called.
The body function will now adequately process chunked bodies,
which means that the body_qs function will too. But this means
that the behavior has changed slightly and your code should be
tested properly when updating your code.
The body and body_qs still accept a length as first argument
for compatibility purpose with older code. Note that this form
is deprecated and will be removed in 1.0. The part and part_body
function, being new and never having been in a release yet, have
this form completely removed in this commit.
Again, while most code should work as-is, you should make sure
that it actually does before pushing this to production.
|
|
|
|
Adds a loop_handler test suite that runs all tests under HTTP, HTTPS,
SPDY each with and without the compress option enabled.
Fixes output filtering that used to filter more than it should have.
This forces us to parse the string sent by the emulator, which means
it's probably not perfect yet. But it should at least not hide errors
we want to see.
Fix a crash in the output filtering code that entirely disabled
output. Now when there is a crash the normal tty output is restored.
Handlers are now in test/handlers/ as they can be reused between
suites.
Only generate a single certificate for the whole ct run to speed
things up when we got many different test groups each needing
certificates.
|
|
|
|
|
|
|
|
|
|
Instead of relying on the encoding of the file we now simply
have list of numbers as they would be inside a latin1 file.
|
|
Tiny optimization.
|
|
|
|
|
|
|
|
|
|
|
|
Use cow_qs:urldecode/1 and cow_qs:urlencode/1 instead
|
|
Pointed out during the ConcuError tutorial by Kostis. Thanks! :-)
|
|
Before, we could have
Header: the value
is multiline
Become "the valueis multiline".
Now it will properly be "the value is multiline".
|