Age | Commit message (Collapse) | Author |
|
Also update the CHANGELOG and copyright years.
|
|
|
|
https://github.com/dysinger/cowboy
Added a comment explaining the '*' always matching.
|
|
|
|
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.
|
|
|
|
|
|
|
|
Excluding generate_etag, last_modified, expires and variances.
|
|
|
|
|
|
Followup to 0bb23f2400ed0b65834913c8522a978d986f1f92.
As discussed in #119.
|
|
They should return true when it has been processed successfully,
or false otherwise, in which case a 500 error is sent.
Fixes #119.
|
|
|
|
Removes the cowboy_clock:date/0, time/0 and datetime/0 exported types.
|
|
|
|
Also add the new 'put_path' metadata information to the request
before entering the put_resource step (which proceeds to call
content_types_accepted and then the chosen content type's callback,
which is expected to use the 'put_path' value as the path to the new
resource instead of the original request path, because it may have
been changed by the create_path call.
|
|
* cowboy_http_protocol now defines 'websocket_version' as metadata.
* cowboy_http_rest now defines 'media_type', 'language', 'charset' as metadata.
|
|
|
|
Based on the patch from Heinz N. Gies. The main change is that his
patch accept values such as */plain which we do not want.
Fixes issue #105.
|
|
|
|
Fix pattern in case statement that was intended
to strip away the first comma separating the
values in the variance header.
Update generation of variance list to use more
idiomatic erlang. Pattern match on list structure
over using erlang:length/1 to compute length.
|
|
|
|
|
|
Only allowing HEAD and GET requests by default.
|
|
REST needed this to be allowed to chain requests on the same connection.
|
|
As with everything experimental, it probably has a lot of bugs and
may not even work.
Like Websocket, REST must be upgraded from a standard resource through
the init/3 function.
A key difference between Webmachine and Cowboy's REST protocol handler
is that in Cowboy the resource has direct access to the request object.
This makes a small change in a few places where you were expected to
return headers or body in Webmachine and are now expected to set them
directly yourself if needed (options/2, for example).
Another difference is that the functions rest_init/2 will always be
called when starting to process a request. Similarly, rest_terminate/2
will be called when the process completes successfully.
The Cowboy REST support also includes automatic language selection,
thanks to the languages_provided/2 callback.
Finally, Cowboy REST expects full URIs to be given at all times, and
will not try to reconstruct URIs from fragments.
Note that REST requests cannot be chained (keepalive) at this time.
This is a design issue in cowboy_http_protocol that will be fixed soon.
Check out the source for more details. It has been designed to be very
easy to read and understand so if you don't understand something,
it's probably a bug. Thanks in advance for all the great bug reports,
pull requests and comments you'll forward my way!
|