Age | Commit message (Collapse) | Author |
|
|
|
A bug was fixed in cowboy_rest where when content_types_provided
returned a media type with a wildcard as first in the list, and
a request comes in without an accept header, then the media_type
value in the Req object would contain '*' instead of [] for the
parameters.
|
|
|
|
And fix this case when multiple ranges are requested.
|
|
Returning the atom auto instead of a callback informs Cowboy
that it needs to handle range requests automatically. This
changes the behavior so that the ProvideCallback function
is called and then Cowboy splits the data on its own and
sends the response without any other user involvement other
than defining the ranges_provided/2 callback.
This is a quick and dirty way to add range request support
to resources, and will be good enough for many cases including
for cowboy_static as it also works when the normal response
body is a sendfile tuple.
|
|
This is currently undocumented but is planned to be documented
in the next version.
|
|
|
|
|
|
|
|
Fix cases where the q-value is 0 and where a wildcard
was sent in the accept-charset header.
Also don't send a charset in the content-type of the
response if the media type is not text.
Thanks to Philip Witty for help figuring this out.
|
|
Thanks to Philip Witty for help figuring this out.
|
|
|
|
|
|
|
|
Also {switch_handler, Module, Opts}.
Allows switching to a different handler type. This is
particularly useful for processing most of the request
with cowboy_rest and then streaming the response body
using cowboy_loop.
|