aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-01-05Stop using rebar in the MakefileLoïc Hoguin
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-04Use erl -eval instead of rebar for generating edoc documentationLoïc Hoguin
2013-01-04Use ct_run instead of rebar ct for running ct testsLoïc Hoguin
Small tweak to the autobahn test file, we look for the python2 executable now. It'll make my life easier.
2013-01-04Hello 2013Loïc Hoguin
2013-01-03Add middleware supportLoïc Hoguin
Middlewares allow customizing the request processing. All existing Cowboy project are incompatible with this commit. You need to change `{dispatch, Dispatch}` in the protocol options to `{env, [{dispatch, Dispatch}]}` to fix your code.
2013-01-03Fix small error in doc commentLoïc Hoguin
2013-01-03Salvage the README and move parts into the guideLoïc Hoguin
2013-01-01Add a skeleton of the guide to ease user contributionsLoïc Hoguin
Has some stuff that aren't in master yet, and lacks a lot more that is already in master.
2012-12-26Remove cowboy_req:body/2Loïc Hoguin
This function was badly thought out and would cause more harm than good if used at all. Recommendation will be for people who need to limit body length to check it beforehand or when not possible to use the stream_body API.
2012-12-26Update Ranch to 0.6.0Loïc Hoguin
2012-12-23Revert "Use lists:keyreplace/4 instead of lists:keydelete/3 + cons"Loïc Hoguin
This reverts commit cc65a723d70bb078b048bab81eeb8a4bd7ed39ce.
2012-12-22use the original request when available for error_terminateTom Burdick
this change makes sure that once a request has been created the error_terminate/3 function uses the original request instead of making a new empty one with undefined values making the request attributes easier to look at in many error cases Conflicts: src/cowboy_protocol.erl
2012-12-22Merge branch 'undefined_url' of git://github.com/treetopllc/cowboyLoïc Hoguin
2012-12-22Merge branch 'fix-websocket-timeout' of git://github.com/jeremyong/cowboyLoïc Hoguin
2012-12-22Cancel timer only on websocket_data receives or sendsJeremy Ong
This commit prevents erlang messages from keeping a websocket connection alive. Previously, the timer was canceled upon any activity. Now, the timeout is only canceled when actual data is sent from the client. The handler_loop_timeout/1 function is called from websocket_data/4 instead of handler_before_loop/4. It is also called after every successful reply in handler_call/4.
2012-12-22Make sure an incorrect port returns a 400 errorLoïc Hoguin
2012-12-22Use lists:keyreplace/4 instead of lists:keydelete/3 + consLoïc Hoguin
2012-12-20Add cookie exampleLoïc Hoguin
2012-12-20We accept iodata() when setting cookies; fix thatLoïc Hoguin
2012-12-20Fix parsing of the Cookie headerLoïc Hoguin
This should be equivalent to what we do in Set-Cookie. Real-world testing is needed to confirm it works as intended.
2012-12-18Improve errors when the path provided is incorrectLoïc Hoguin
2012-12-17Merge branch 'master' of git://github.com/Menirad/cowboyLoïc Hoguin
2012-12-17Add #ninenines IRC channel to the README + support optionsLoïc Hoguin
2012-12-17Fix cowboy_http:cookie_to_iodata/3Loïc Hoguin
No more trying to quote, this is still completely broken everywhere.
2012-12-14Fix multipart parser when the boundary is not fully read yetThomas Nordström
2012-12-14Improve Markdown for the examples READMELoïc Hoguin
2012-12-13Merge branch 'adt-consistent-errors' of git://github.com/Vagabond/cowboyLoïc Hoguin
2012-12-13Add missing quotes to quoting for cookie valuesLoïc Hoguin
2012-12-13Make the arguments to error_logger more consistentAndrew Thompson
The purpose of this patch is to make the arguments cowboy passes to error_logger more consistent. With this patch there's only 3 variations on the error_logger argument list; a 5 element list, an 8 element list and a 10 element list. In all cases, the first 3 arguments are the Module, Function and Arity of the function being called and the second-to-last argument is always the Request. Additionally, for lists longer than 5 elements, the last argument is always the stack-trace. The added consistency of the argument ordering makes it much easier to write code in lager's error_logger handler to catch these messages and write a pretty one-liner (while writing the full message to the crash.log).
2012-12-10Merge pull request #335 from derdesign/masterLoïc Hoguin
Fix broken 'make docs'
2012-12-10Fix broken 'make docs'derdesign
2012-12-11Fix charset not working properly for RESTLoïc Hoguin
2012-12-08Add {close, StatusCode, Payload} and fix {close, Payload}Loïc Hoguin
2012-12-07Merge branch 'websocket_terminate_not_called' of git://github.com/dergraf/cowboyLoïc Hoguin
2012-12-07Small Markdown fixes to better follow the specsLoïc Hoguin
2012-12-07Update CHANGELOGLoïc Hoguin
2012-12-07Make cookies use universal time instead of local timeLoïc Hoguin
Includes: * cowboy_clock:rfc2109/1 now expects UTC datetime * Rewrite of the cookie code to cowboy_http * Removal of cowboy_cookies * Add type cowboy_req:cookie_opts/0 Cookies should now be set using cowboy_req:set_resp_cookie/3. Code calling cowboy_cookies directly will need to be updated.
2012-12-06call websocket_terminate in case of a handshake errorAndre Graf
2012-12-05Make a few more missing headers lowercaseLoïc Hoguin
2012-12-03Remove the dependency on httpd_utilLoïc Hoguin
Add the function cowboy_clock:rfc1123/1 that formats the given date to the RFC1123 format.
2012-12-03Allow passing the Req and an updated Opts when upgrading protocolsLoïc Hoguin
2012-12-02Add more frame types available in websocket repliesLoïc Hoguin
We can now reply empty close, ping and pong frames, or close frames with a payload. This means that we can send a frame and then close the connection in a single operation. If a close packet is sent, the connection is closed immediately, even if there was frames that remained to be sent. Cowboy will silently drop any extra frames in the list given as a reply.
2012-12-01Return full packet as multipart body if possibleMagnus Klaar
2012-12-01Use Transport:sendfile/2 from RanchLoïc Hoguin
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-11-30Return a 400 error if the Accept header was incorrectLoïc Hoguin
2012-11-29Add a better error message when user callbacks are not exportedLoïc Hoguin
2012-11-29static: Allow passing the mimetype fun as a {M, F} tupleLoïc Hoguin
2012-11-28Update the cowboy_websocket_handler specsLoïc Hoguin
We can send many payloads at once.
2012-11-28Clarify error reports indicating they come from CowboyLoïc Hoguin
2012-11-28Merge branch 'master' of git://github.com/chancila/cowboyLoïc Hoguin