Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-04-03 | Add an AUTHORS file. | Loïc Hoguin | |
2011-04-03 | Ensure the listening socket gets closed with the listener supervisor. | Loïc Hoguin | |
Moved the Transport:listen call to cowboy_acceptors_sup. This make it depend on a child of cowboy_listener_sup instead of cowboy_sup, which isn't getting shut down when calling cowboy:stop_listener/1 and thus didn't close the listening socket. | |||
2011-04-03 | Make Cowboy an OTP application again, properly this time. | Loïc Hoguin | |
As requested by many people on IRC Cowboy is now a proper OTP application to support soft code upgrades. It should also be easier to start and stop listeners now using cowboy:start_listener/6 and cowboy:stop_listener/1. | |||
2011-04-02 | Anonymize and improve the cowboy supervision tree. | Loïc Hoguin | |
* Cowboy isn't an OTP application anymore; just a supervisor. * All processes started by Cowboy are now anonymous. * All processes related to a listener are now part of its supervision tree. | |||
2011-03-29 | Merge remote-tracking branch 'nox/improve-http-req' | Loïc Hoguin | |
2011-03-29 | Make the default value the last parameter of HTTP req accessors | Anthony Ramine | |
This makes cowboy_http_req's qs_val/3, binding/3 and header/3 behave like proplists:get_value/3. | |||
2011-03-29 | Make HTTP req accessors call themselves with their default default value | Anthony Ramine | |
Use lists:keyfind/3 in qs_val/3, binding/3 and header/3 and make qs_val/2, binding/2 and header/2 call those. | |||
2011-03-29 | Fix cowboy_http_req:body with regard to the new accessors default value | Anthony Ramine | |
header/2 now returns 'undefined' when the header isn't in the request. | |||
2011-03-27 | Return undefined instead of failing or returning "" when a value doesn't exist. | Loïc Hoguin | |
2011-03-27 | Use a more efficient variant of string:to_lower to improve performance. | Loïc Hoguin | |
After much testing and experimentation of all kinds I find lists to be both faster and using less memory than binaries for request-line and headers handling. This is more than likely due to the fact that headers are very short and thus do not benefit from the advantages of refc binaries, meaning they're copied, just like lists. The memory usage discrepancy is still a mystery for the most part, although the hoops needed to perform operations on the binaries are probably responsible for the extra memory use. I'm thus giving up on trying to use binaries for request-line and headers. Instead, this commit improves performances even more to the lists code, making lists 5% faster than binaries. Lists are easier to work with too, so I guess it's all a big win for everyone. Of course the request body is still read as a binary, we're using the binary type where it performs best. | |||
2011-03-27 | Match early in connection_to_atom for a small performance improvement. | Loïc Hoguin | |
2011-03-27 | Fix query string related type specs in cowboy_http_req. | Loïc Hoguin | |
2011-03-27 | Fix the type spec for qs_vals, a list of key/values. | Loïc Hoguin | |
2011-03-24 | Add the cowboy_http_handler behaviour. | Loïc Hoguin | |
2011-03-23 | Merge remote-tracking branch 'ndim/master' | Loïc Hoguin | |
2011-03-23 | Makefile: Use a REBAR variable | Hans Ulrich Niedermann | |
Using a REBAR variable makes it easy for the user to override the REBAR to be called. | |||
2011-03-22 | Allow Handler:init/3 to request a protocol upgrade. | Loïc Hoguin | |
2011-03-22 | Forward transport and protocol name to Handler:init. | Loïc Hoguin | |
2011-03-22 | Add cowboy_tcp_transport:name/0 to ease transport identification later on. | Loïc Hoguin | |
2011-03-22 | Boring 80-col change. | Loïc Hoguin | |
2011-03-22 | Introduce cowboy_http_req:body_qs/1 for automated urlencoded body parsing. | Loïc Hoguin | |
2011-03-22 | Fix spec for cowboy_http_req:parse_qs/1. | Loïc Hoguin | |
2011-03-22 | Fix spec for cowboy_http_req:body/1 and body/2. | Loïc Hoguin | |
2011-03-22 | Explicitly ignore the return value of cowboy_http_req:reply in error_response. | Loïc Hoguin | |
2011-03-22 | Fix the type spec for path_tokens, a list of *non empty* strings. | Loïc Hoguin | |
2011-03-22 | Add more dialyzer warnings to rebar.config. | Loïc Hoguin | |
2011-03-21 | Add a rebar.config file with useful options. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_tcp_transport:close/1. | Loïc Hoguin | |
Apparently the documentation is wrong for gen_tcp:close/1, it returns only ok. | |||
2011-03-21 | Fix spec for cowboy_http_req:reply/4. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_http_req:qs_vals/1. | Loïc Hoguin | |
2011-03-21 | Fix spec for the #http_spec.path record field. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_http_protocol:init/3. | Loïc Hoguin | |
2011-03-21 | Fix tests for cowboy_dispatcher:split_path/1. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_dispatcher:split_path/1. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_dispatcher:split_host/1. | Loïc Hoguin | |
2011-03-21 | Introduce cowboy_http_req:body/1 to read the full request body. | Loïc Hoguin | |
2011-03-21 | Make sure error_response always returns ok. | Loïc Hoguin | |
2011-03-21 | Add specs to ensure_response and change the clauses order. | Loïc Hoguin | |
2011-03-21 | Skip the request body if it hasn't been read by the handler. | Loïc Hoguin | |
2011-03-20 | Ensure a response is sent when the handler doesn't reply anything. | Loïc Hoguin | |
2011-03-20 | Move the error response code into a separate function. | Loïc Hoguin | |
2011-03-20 | Make sure we can only reply to an HTTP request inside Handler:handle. | Loïc Hoguin | |
Of course since requests are a record the response state can be explicitly overriden, but standard use prevents errors by making sure only one reply is sent. | |||
2011-03-20 | Lazy-retrieve the peer name and port to avoid wasting time each request. | Loïc Hoguin | |
2011-03-20 | Change a @todo for Handler:init possible return values. | Loïc Hoguin | |
2011-03-20 | Rename a variable in cowboy_http_protocol for clarity. | Loïc Hoguin | |
2011-03-20 | Allow code reloading inside the cowboy_http_protocol module during keep-alive. | Loïc Hoguin | |
2011-03-20 | Rename the title for Getting Started in the README. | Loïc Hoguin | |
2011-03-20 | Default the connection to keep-alive on HTTP/1.1 and close on 1.0. | Loïc Hoguin | |
2011-03-20 | Remove a dead code clause for split_path. | Loïc Hoguin | |
2011-03-20 | Save the raw path string in the request. | Loïc Hoguin | |