Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: nofate/cowboy
base: master
...
head fork: RJ/cowboy
compare: x-webkit-deflate-frame
Commits on Jul 13, 2012
Loïc Hoguin essen Add an Hello World example b8a25b1
Commits on Jul 14, 2012
Loïc Hoguin essen Add a simple Static File Server example 86f9f48
Commits on Jul 21, 2012
Loïc Hoguin essen REST: Fix charset matching 95ed134
Loïc Hoguin essen REST: Normalize content types accepted
Same as content types provided, we accept the <<"application/json">> form.
3d1ddd1
Commits on Jul 22, 2012
Loïc Hoguin essen Add support for Expect: 100-continue
This makes uploading files with curl a lot faster than without.
dc759fa
Loïc Hoguin essen Add a GET echo example 370b3d9
Loïc Hoguin essen Add a POST echo example 73c0737
Loïc Hoguin essen Add a Chunked Hello World example 6ea32d6
Loïc Hoguin essen Add a REST Hello World example f212caf
Loïc Hoguin essen Look for parsed headers in the cache before trying to parse adc3639
Loïc Hoguin essen Remove an useless todo bab6290
Commits on Jul 23, 2012
Josh Marchán Don't save parsed value in the Host header f3c5881
Loïc Hoguin essen Improve typespecs 76d6ed8
Commits on Jul 31, 2012
Seven Du seven1240 Fix stream_body when used by multipart 2645044
Commits on Aug 08, 2012
Loïc Hoguin essen Update version to 0.6.1 af07e04
Commits on Aug 09, 2012
Loïc Hoguin essen Update AUTHORS file 50e5a61
Commits on Aug 27, 2012
Loïc Hoguin essen Switch to Ranch for connection handling
This is the first of many API incompatible changes.

You have been warned.
e4124de
Loïc Hoguin essen Have only one -export and -export_type per line
This should make easier spotting additions and removals in commits.
a5e7521
Loïc Hoguin essen Change a websocket error from {error, protocol} to {error, badframe}
For improved consistency.
10adcdb
Loïc Hoguin 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.
cc2e084
Loïc Hoguin essen Rename cowboy_http_protocol to cowboy_protocol 9e2622b
Loïc Hoguin essen Rename cowboy_http_req to cowboy_req d3dcaf1
Loïc Hoguin essen Rename cowboy_http_rest to cowboy_rest 6d84afd
Loïc Hoguin essen Rename cowboy_http_static to cowboy_static f39c001
Loïc Hoguin essen Rename cowboy_http_websocket to cowboy_websocket 0e3adf1
Loïc Hoguin essen Introduce a cowboy_req:req/0 type
Cleanup the typespecs of the cowboy_req module following this.
e17e186
Commits on Sep 10, 2012
Loïc Hoguin 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.
6fa734b
Loïc Hoguin 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.
79839b7
Commits on Sep 14, 2012
Loïc Hoguin essen Separate multipart from body_state 4040a9f
Loïc Hoguin essen Change type #http_req{} to cowboy_req:req()
This removes cowboy_static's dependency on http.hrl.
d9e76d5
Commits on Sep 15, 2012
Loïc Hoguin essen Remove two unneeded Req modifications 9b5cbb5
Loïc Hoguin essen Add a cowboy_req:to_list/1 function
Removes a lot of duplicate code when printing error messages.
bb4bd9a
Loïc Hoguin essen Put socket and transport into cowboy_websocket's #state{}
As part of the work to make cowboy_req:req() opaque.
35ebe0b
Loïc Hoguin essen Avoid a duplicate HTTP reply in cowboy_websocket:upgrade_error/1
Do this by checking whether we received the resp_sent message.
cd54214
Loïc Hoguin essen Add cowboy_req:url/1 to return the full request URL
Use it in cowboy_websocket for hixie76, replacing http by ws.
27d5911
Loïc Hoguin essen Remove duplicate code for ensure_response 0aaa717
Loïc Hoguin essen Use skip_body directly between requests
There's no need for more complex logic now that we have
the API for it.
f65f7d1
Loïc Hoguin essen Introduce cowboy_req:set_meta/3 to set request metadata 9ef94fb
Loïc Hoguin essen Put the method in cowboy_rest's #state{} 736bcd4
Loïc Hoguin essen Introduce cowboy_req:host_url/1 to remove more duplicate code 527477b
Commits on Sep 16, 2012
Loïc Hoguin essen Add cowboy_req:delete_resp_header/2
Both requested and better for making Req opaque.
e13ab80
Commits on Sep 17, 2012
Loïc Hoguin 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.
8d5f8db
Loïc Hoguin essen Add a function to lock request responses instead of inlining
Just more cleanup in order to have req() opaque.
f205d44
Loïc Hoguin essen Remove http.hrl dependency in cowboy_rest
Only cowboy_protocol remaining now.
82d7e89
Loïc Hoguin essen Use cowboy_req:version/1 in cowboy_protocol where applicable
More cleanup towards making cowboy_req:req() opaque.
c1f5a2a
Loïc Hoguin 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.
6dbc1f9
Loïc Hoguin essen Add the private function set_host/4 used by cowboy_protocol 350d4ae
Loïc Hoguin essen Add the private set_connection/2 function used by cowboy_protocol 905083a
Loïc Hoguin essen Add the private add_header/3 function used by cowboy_protocol fc02b7f
Loïc Hoguin essen Add the private set_buffer/2 function used by cowboy_protocol 5b56dd7
Loïc Hoguin essen Add the private set_bindings/4 function used by cowboy_protocol c1dd5b5
Loïc Hoguin essen Add the private get_resp_state/1 function used by cowboy_protocol e55ec7d
Loïc Hoguin essen Add the private get_buffer/1 function used by cowboy_protocol cf0e905
Loïc Hoguin essen Add the private get_connection/1 function used by cowboy_protocol
This removes cowboy_protocol's dependency on http.hrl!
58edd4c
Loïc Hoguin 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.
183bf7f
Loïc Hoguin essen Include the eunit file only if TEST is defined 13b743b
Loïc Hoguin essen Rename cowboy_req:raw_qs/1 to cowboy_req:qs/1 18be3a8
Loïc Hoguin essen Replace many proplists:get_value/{2,3} calls by BIFs
Originally suggested by Roberto Ostinelli.
9090cd9
Loïc Hoguin essen Add types for onrequest and onresponse funs c2be7c1
Loïc Hoguin essen Update CHANGELOG f6791b0
Commits on Sep 21, 2012
Loïc Hoguin 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.
8497c8b
Loïc Hoguin 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)
3402166
Loïc Hoguin 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.
e27fd5f
Loïc Hoguin essen Update CHANGELOG 981ea35
Commits on Sep 30, 2012
Richard Jones RJ add websockets example a74fbd7
Richard Jones RJ implement x-webkit-deflate-frame for websockets 675a648