0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Commit graph

35 commits

Author SHA1 Message Date
Loïc Hoguin
0502452967 Update cowlib to 0.6.1 2014-03-27 11:39:09 +01:00
Loïc Hoguin
9110ee83fe Update rebar.config 2014-03-25 18:23:26 +01:00
Loïc Hoguin
340cf8581f Update cowlib to 0.5.1 to fix multipart issues 2014-02-19 19:09:58 +01:00
Loïc Hoguin
917cf99e10 Add and document the new multipart code
The old undocumented API is removed entirely.

While a documentation exists for the new API, it will not
be considered set in stone until further testing has been
performed, and a file upload example has been added.

The new API should be a little more efficient than the
old API, especially with smaller messages.
2014-02-06 19:36:25 +01:00
Loïc Hoguin
b8923de7c5 Update Ranch to 0.9.0 2013-11-14 15:32:02 +01:00
Loïc Hoguin
8d546dacbc Optimize query string parsing
*  Parsing code was moved to cowlib: cowboy_qs:parse_qs/1
 *  A function was added to build query strings: cowboy_qs:qs/1
 *  Also added cowboy_qs:urlencode/1 and cowboy_qsurldecode/1
2013-11-08 18:47:05 +01:00
Loïc Hoguin
6672ea0415 Review, improve and document the static files handler
Changes include:

 *  Much simplified route configuration.

 *  Etag generation is now enabled by default.

 *  Web mimetypes are now detected by default. A bigger list of
    mimetypes can be detected without any additional library.

 *  Mimetypes can no longer be specified as a list. Copying this
    list for new connections is too costy. You can easily convert
    it into a function and pass that function to the handler instead.

 *  You can however specify a single hardcoded mimetype. Mostly
    useful when serving a single file, like an index.html file,
    to avoid extra operations.

 *  Specifying a path as a list of tokens is not possible anymore.
    Use either a binary or a string.

 *  Using a private directory will not work if the application
    was not started properly. Cowboy will not attempt to find
    the location of this directory if the VM doesn't know it,
    as this caused issues in some setups.

 *  Overall the code has been much simplified and clarified,
    and of course has now been documented.
2013-11-02 14:41:46 +01:00
Loïc Hoguin
faf64524c6 Move cookie parsing/building code to cowlib
The code for parsing has also been rewritten to be more efficient
and to be able to handle cookie values with space inside them properly.

Update cowlib to 0.2.0.
2013-10-23 16:35:23 +02:00
Loïc Hoguin
4a30198f90 Make cowlib a proper dependency
Start moving a few functions from Cowboy into cowlib.
2013-09-04 19:24:54 +02:00
Loïc Hoguin
694c9bfbfa Update Ranch to 0.8.5 2013-08-24 20:35:28 +02:00
Loïc Hoguin
2923de944f Update Ranch to 0.8.4 2013-06-20 16:01:53 +02:00
Loïc Hoguin
3d2f7218c5 Update Ranch to 0.8.3 2013-05-16 19:10:32 +02:00
Loïc Hoguin
6e33274c85 Update Ranch to 0.8.2 and use ct_helper for testing SSL 2013-05-01 18:30:00 +02:00
Loïc Hoguin
d063511a0e Update Ranch to 0.8.1 2013-04-12 15:24:59 +02:00
Loïc Hoguin
2b56bb498f Update Ranch to 0.8.0 2013-04-03 13:47:12 +02:00
Loïc Hoguin
e16fae1196 Update Ranch to 0.6.2 2013-03-06 20:19:15 +01:00
Loïc Hoguin
ba924cbb7f Update Ranch to 0.6.1 2013-01-29 01:20:16 +01:00
Loïc Hoguin
d8be610d4c Stop using rebar in the Makefile
First and foremost: yes, you can still use Cowboy as a rebar dependency.
This commit only removes the use of rebar when *developing* Cowboy, not
when *using* Cowboy.

Over the past two years I went from very happy with rebar to unsatisfied
and most recently found it counter productive in many ways, from having
insane default configuration to various unefficient operations. The earlier
reversal from 'rebar ct' to 'ct_run' made my workflow much more natural,
as I always needed to look at 'logs/raw.log' to find out what was wrong,
anyway. Why not let 'ct_run' output it directly instead? Removing rebar
made my life easier.

If you wonder why I don't patch rebar, there's two reasons. First is that
the direction taken by rebar isn't compatible with my views, and this
would be a huge fight to steer it in another direction. I got other,
more important fights to make. Second is that I'd rather patch OTP so
that everyone benefits from it, not just users of rebar.

Anyway this isn't my personal blog so I will stop babbling here. There's
a few important things to note relative to this commit:

 *  You don't need rebar to work on Cowboy anymore
 *  The eunit tests are now ran through common_test

Ping me if it doesn't work out for you.
2013-01-05 17:25:04 +01:00
Loïc Hoguin
f401a84be6 Update Ranch to 0.6.0 2012-12-26 01:57:45 +01:00
Loïc Hoguin
72b26c6d0c Use Transport:sendfile/2 from Ranch
This removes a bunch of unneeded code, including code that was
made for R14 which we don't support anymore.

Note that the dependency on Ranch was updated, so you will need
to update Ranch for the new code to work.
2012-12-01 10:29:26 +01:00
Loïc Hoguin
7481cf9963 Update Ranch to latest commit 2012-09-26 14:20:18 +02:00
Loïc Hoguin
e4124de2c7 Switch to Ranch for connection handling
This is the first of many API incompatible changes.

You have been warned.
2012-08-27 11:50:35 +02:00
Loïc Hoguin
4b27d3ec43 Use a separate rebar.config file for running tests 2012-04-12 22:04:58 +02:00
Magnus Klaar
c747efbd75 replace quoted:from_url with cowboy_http:urldecode
This change makes the dependency on quoted optional
by adding a minimal urldecode function to cowboy.

A protocol option for setting the urldecoding function
has been added to the cowboy_http_protocol module.
The default value for this option is set to be
equivalent to the default settings for quoted.

{fun cowboy_http:urldecode/2, crash}

A note has been added in the README to document
how to use quoted instead of this function.

A field to store this option value has been added
to the state record in the cowboy_http_protocol
module and the http_req record in include/http.hrl

Functions that previously used quoted:from_url/1
has been updated to require an equivalent function
in addition to the previously required arguments.

This change removes a C compiler from the build
requirements of cowboy. It also removes the requirement
to cross compile the code if the target arch/OS
is different from the arch/OS used to build it.
2011-12-07 19:02:10 +01:00
Loïc Hoguin
a55d1966f4 Bump quoted to version 1.2.0 2011-10-11 10:21:59 +02:00
Tom Burdick
a29ccb070b Add cowboy_cookies for cookie creation and parsing
Based on Mochi Media, Inc.'s work in Mochiweb.

Conflicts:

	rebar.config
2011-07-26 13:52:21 +02:00
Loïc Hoguin
acc5f50ab5 Update quoted to 1.0.3 to fix outstanding issues
Magnus Klaar updated the PropEr tests and it should be fine now.
2011-07-26 12:36:35 +02:00
Loïc Hoguin
e5d4c1f22f Add a PropEr test for cowboy_dispatcher:split_host/1
Mostly thanks to Magnus Klaar as it took me a while to figure
out how PropEr tests had to be written.
2011-07-26 10:46:06 +02:00
Loïc Hoguin
fa20273b37 URL decode query strings
Should be good for both GET and POST query strings.

This adds https://github.com/klaar/quoted.erl as a dependency.
Props to klaar for this code.
2011-07-20 17:38:10 +02:00
Loïc Hoguin
58267689f0 Add the remaining missing specs
Found thanks to warn_missing_spec and added with the help of typer.
Eunit functions do not have specs yet however.
2011-06-27 23:36:17 +02:00
Loïc Hoguin
f03dbf4d06 Use dialyzer directly instead of through rebar
Rebar recently removed their dialyzer support options so we're switching
to plain dialyzer. And as a bonus it works much better!
2011-06-21 17:24:07 +02:00
Anthony Ramine
107eba92a3 Enable code coverage 2011-05-16 11:42:15 +02:00
Loïc Hoguin
aab91c044b Don't enable binary optimization warnings by default.
It's problematic: both doing it right and doing it wrong trigger a warning
and we treat warnings as errors.
2011-04-12 16:23:52 +02:00
Loïc Hoguin
06ff8607ed Add more dialyzer warnings to rebar.config. 2011-03-22 12:25:43 +01:00
Loïc Hoguin
3b6f3004a6 Add a rebar.config file with useful options. 2011-03-21 23:36:51 +01:00