Age | Commit message (Collapse) | Author |
|
|
|
|
|
This makes uploading files with curl a lot faster than without.
|
|
Same as content types provided, we accept the <<"application/json">> form.
|
|
|
|
Also update the CHANGELOG and copyright years.
|
|
|
|
Fix alphabetical order since @klaar seems to have issues with it. ;)
|
|
|
|
|
|
|
|
|
|
* Ensures cookie encoding errors are caught earlier
* Fix separator misspelling
|
|
See http://tools.ietf.org/html/rfc6585 for further details.
|
|
|
|
|
|
|
|
|
|
|
|
This new protocol option is a fun.
It expects 3 args: the Status code used in the reply (this is the
cowboy_http:status() type, it can be an integer or a binary), the
headers that will be sent in the reply, and the Req. It should
only return a possibly modified Req. This can be used for many
things like error logging or custom error pages.
If a reply is sent inside the hook, then Cowboy will discard the
reply initially sent. Extra caution must be used in the handlers
making use of inline chunked replies as they will throw an error.
This fun cannot be used as a filter, you can either observe the
reply sent or discard it to send a different one instead.
The hook will not be called for replies sent from inside the hook.
|
|
|
|
|
|
|
|
Use a proper HTTP client to run all tests. This client is currently
undocumented and should not be used.
Includes a few fixes:
* Fix a bug in the max_keepalive test
* Fix a bug with max_keepalive handling
* Fix a bug in stream_body/1 where data was lost under some conditions
The tests now run quite faster than before.
All the tests now run twice: once for TCP, once for SSL.
|
|
|
|
Certain user agents send invalid Accept-Charset headers, like the
following: "ISO-8859-1;utf-8;q=0.7,*;q=0.7"
The user agent with which this behavior was observed presented itself
with the User-Agent string: "Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.9) Gecko/2008052906 Firefox/3.0" Although this doesn't
appear to be correct. The request might have been mangled by a
transparent proxy.
|
|
|
|
|
|
|
|
|
|
Introduces 3 low level functions and updates the existing higher
levels functions. The new primitives are has_body/1, body_length/1
and stream_body/1. In addition to that, a helper function
init_stream/4 has been added.
Streaming a body implies to decode the Transfer-Encoding and
Content-Encoding used for the body. By default, Cowboy will try
to figure out what was used and decode them properly. You can
override this if you want to disable this behavior or simply
support more encodings by calling the init_stream/4 function
before you start streaming the body.
|
|
|
|
https://github.com/tillitech/cowboy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This new protocol option is a fun.
It expects a single arg, the Req, and should only return a possibly
modified Req. This can be used for many things like URL rewriting,
access logging or listener-wide authentication.
If a reply is sent inside the hook, then Cowboy will consider the
request handled and will move on to the next one.
|
|
Fixes compatibility issue #140 reported by @majek.
|
|
https://github.com/dysinger/cowboy
Added a comment explaining the '*' always matching.
|
|
https://github.com/tillitech/cowboy
|
|
Thanks go to @superbobry for pointing it out.
|
|
|
|
Certain user agents send slightly invalid media types, like the
following: "text/html, image/gif, image/jpeg, ; q=.2, */; q=.2"
The user agent with which this behavior was observed presented itself
with the User-Agent string: "Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (FlipboardProxy/0.0.5;
+http://flipboard.com/browserproxy)"
|
|
|
|
The return value from the generate_etag/2 callback is expected to be a
binary tagged with either weak or strong. This binary is quoted, and
may be prefixed with W/ before it is set as the value of the ETag header
in the response.
For backwards compatibility with older handlers where the return value
was expected to be a quoted binary a function has been added to parse any
return values that are untagged binaries. All untagged binaries are expected
to be a valid value for the ETag header.
|
|
|
|
|