Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Checking mergeability… Don’t worry, you can still create the pull request.
Commits on Jul 13, 2012
@essen essen Add an Hello World example b8a25b1
Commits on Jul 14, 2012
@essen essen Add a simple Static File Server example 86f9f48
Commits on Jul 21, 2012
@essen essen REST: Fix charset matching 95ed134
@essen essen REST: Normalize content types accepted
Same as content types provided, we accept the <<"application/json">> form.
Commits on Jul 22, 2012
@essen essen Add support for Expect: 100-continue
This makes uploading files with curl a lot faster than without.
@essen essen Add a GET echo example 370b3d9
@essen essen Add a POST echo example 73c0737
@essen essen Add a Chunked Hello World example 6ea32d6
@essen essen Add a REST Hello World example f212caf
@essen essen Look for parsed headers in the cache before trying to parse adc3639
@essen essen Remove an useless todo bab6290
Commits on Jul 23, 2012
Josh Marchán Don't save parsed value in the Host header f3c5881
@essen essen Improve typespecs 76d6ed8
Commits on Jul 31, 2012
@seven1240 seven1240 Fix stream_body when used by multipart 2645044
Commits on Aug 08, 2012
@essen essen Update version to 0.6.1 af07e04
Commits on Aug 09, 2012
@essen essen Update AUTHORS file 50e5a61
Commits on Aug 27, 2012
@essen essen Switch to Ranch for connection handling
This is the first of many API incompatible changes.

You have been warned.
@essen essen Have only one -export and -export_type per line
This should make easier spotting additions and removals in commits.
@essen essen Change a websocket error from {error, protocol} to {error, badframe}
For improved consistency.
@essen essen Update behaviours for R15B+
This effectively drops the R14B compatibility.

The cowboy_req:req() type will be introduced in a future commit.
It refers to the #http_req{} record.
@essen essen Rename cowboy_http_protocol to cowboy_protocol 9e2622b
@essen essen Rename cowboy_http_req to cowboy_req d3dcaf1
@essen essen Rename cowboy_http_rest to cowboy_rest 6d84afd
@essen essen Rename cowboy_http_static to cowboy_static f39c001
@essen essen Rename cowboy_http_websocket to cowboy_websocket 0e3adf1
@essen essen Introduce a cowboy_req:req/0 type
Cleanup the typespecs of the cowboy_req module following this.
Commits on Sep 10, 2012
@essen essen Replace cowboy_req:host/1 with cowboy_req:raw_host/1
The latter is much more useful than the former, which ends up
being removed.
@essen essen Replace cowboy_req:path/1 with cowboy_req:raw_path/1
The latter is much more useful than the former, which ends up
being removed.
Commits on Sep 14, 2012
@essen essen Separate multipart from body_state 4040a9f
@essen essen Change type #http_req{} to cowboy_req:req()
This removes cowboy_static's dependency on http.hrl.
Commits on Sep 15, 2012
@essen essen Remove two unneeded Req modifications 9b5cbb5
@essen essen Add a cowboy_req:to_list/1 function
Removes a lot of duplicate code when printing error messages.
@essen essen Put socket and transport into cowboy_websocket's #state{}
As part of the work to make cowboy_req:req() opaque.
@essen essen Avoid a duplicate HTTP reply in cowboy_websocket:upgrade_error/1
Do this by checking whether we received the resp_sent message.
@essen essen Add cowboy_req:url/1 to return the full request URL
Use it in cowboy_websocket for hixie76, replacing http by ws.
@essen essen Remove duplicate code for ensure_response 0aaa717
@essen essen Use skip_body directly between requests
There's no need for more complex logic now that we have
the API for it.
@essen essen Introduce cowboy_req:set_meta/3 to set request metadata 9ef94fb
@essen essen Put the method in cowboy_rest's #state{} 736bcd4
@essen essen Introduce cowboy_req:host_url/1 to remove more duplicate code 527477b
Commits on Sep 16, 2012
@essen essen Add cowboy_req:delete_resp_header/2
Both requested and better for making Req opaque.
Commits on Sep 17, 2012
@essen essen Improve consistency of return types for cowboy_req API
The signature of parse_header, body_qs, multipart_data and
the set_resp_* functions has changed.

See the cowboy_req module edoc for more details.
@essen essen Add a function to lock request responses instead of inlining
Just more cleanup in order to have req() opaque.
@essen essen Remove http.hrl dependency in cowboy_rest
Only cowboy_protocol remaining now.
@essen essen Use cowboy_req:version/1 in cowboy_protocol where applicable
More cleanup towards making cowboy_req:req() opaque.
@essen essen Add a private cowboy_req function to create a Req object
Private means you must not used it. It's meant for internal use.
@essen essen Add the private function set_host/4 used by cowboy_protocol 350d4ae
@essen essen Add the private set_connection/2 function used by cowboy_protocol 905083a
@essen essen Add the private add_header/3 function used by cowboy_protocol fc02b7f
@essen essen Add the private set_buffer/2 function used by cowboy_protocol 5b56dd7
@essen essen Add the private set_bindings/4 function used by cowboy_protocol c1dd5b5
@essen essen Add the private get_resp_state/1 function used by cowboy_protocol e55ec7d
@essen essen Add the private get_buffer/1 function used by cowboy_protocol cf0e905
@essen essen Add the private get_connection/1 function used by cowboy_protocol
This removes cowboy_protocol's dependency on http.hrl!
@essen essen Make cowboy_req:req() opaque
Remove http.hrl in the process.

If you feel furious about this change after reaching this commit,
don't worry! You probably just need a few access or modification
functions to be added in cowboy_req for your needs. Problem is,
I don't know these. I'll be very thankful if you can open a ticket
and tell me all about it so the best solution can be swiftly
implemented to make you happy again.
@essen essen Include the eunit file only if TEST is defined 13b743b
@essen essen Rename cowboy_req:raw_qs/1 to cowboy_req:qs/1 18be3a8
@essen essen Replace many proplists:get_value/{2,3} calls by BIFs
Originally suggested by Roberto Ostinelli.
@essen essen Add types for onrequest and onresponse funs c2be7c1
@essen essen Update CHANGELOG f6791b0
Commits on Sep 21, 2012
@essen essen Don't use decode_packet/3 for parsing the request-line
First step in making all methods and header names binaries to
get rid of many inconsistencies caused by decode_packet/3.

Methods are all binary now. Note that since they are case
sensitive, the usual methods become <<"GET">>, <<"POST">> and so on.
@essen essen Don't use decode_packet/3 for parsing the headers
Header names are now binaries. Since header names are case insensitive
they are all converted to lowercase. For example: <<"content-length">>.

The max_line_length option was removed. Three new options have been
added instead:

 *  max_request_line_length (defaults to 4096)
 *  max_header_name_length (defaults to 64)
 *  max_header_value_length (defaults to 4096)
@essen essen Make multipart part headers binary lowercase
Here we do not remove decode_packet yet, we just lowercase the
header name and transform it into a binary if needed, to fix
the consistency issue.
@essen essen Update CHANGELOG 981ea35
Commits on Sep 30, 2012
@RJ RJ add websockets example a74fbd7
@RJ RJ implement x-webkit-deflate-frame for websockets 675a648