aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2011-10-04Remove the connection information from the HTTP protocol stateLoïc Hoguin
Use the Req connection information instead.
2011-10-04Close connection on all errorsLoïc Hoguin
And use a proper cowboy_http_req:reply/4 call for the 204 response.
2011-10-04Small doc clarificationLoïc Hoguin
2011-10-04Do not send a 408 response if the Request-Line wasn't fully receivedLoïc Hoguin
The server should not send a response if there wasn't at least the beginning of a request sent (the Request-Line).
2011-10-01Get rid of a binary construct in cowboy_http_websocketLoïc Hoguin
Thanks to @nivertech for pointing it out in ticket #61.
2011-10-01Get rid of a binary construct in cowboy_http_reqLoïc Hoguin
Thanks to @klaar for pointing it out in ticket #59.
2011-10-01Rename the type cowboy_dispatcher:path_tokens/0 to :tokens/0Loïc Hoguin
2011-10-01Merge branch 'path-split-doc' of https://github.com/klaar/cowboyLoïc Hoguin
2011-10-01Merge branch 'master' of https://github.com/hakvroot/cowboyLoïc Hoguin
2011-09-30Add cowboy_protocol behaviourMichiel Hakvoort
2011-09-29add note to split_path/1 and path/1 on escaped /Magnus Klaar
2011-09-28Improve the error message for HTTP handlersLoïc Hoguin
Making it look more like the websocket handler error messages.
2011-09-28Merge remote-tracking branch 'smarkets/cacertfile'Loïc Hoguin
2011-09-28add cacertfile configurationSteven Gravell
2011-09-26Fix handshake for when querystring is neededOri Bar
2011-09-22Add a test for websocket hibernate + timeout and fix this use caseLoïc Hoguin
The issue was that we were calling erlang:hibernate before a receive .. after .. end call. Erlang hibernates the process before reaching the receive instruction and we therefore couldn't enter the after clause when hibernating. This is now fixed by using erlang:send_after instead and receiving that message instead of using an after clause.
2011-09-15Allow websocket handlers to hibernate from the websocket_init/3 functionLoïc Hoguin
Also improve the documentation about hibernate.
2011-09-14'Host' header is optional in HTTP/1.0Loïc Hoguin
Krishnamurthy, Kristol, Mogul: "Key Differences between HTTP/1.0 and HTTP/1.1", "Internet address conservation". http://www8.org/w8-papers/5c-protocols/key/key.html Fixes issue #35 reported by Alex Kropivny.
2011-09-13Reset the max number of empty lines between keepalive requestsLoïc Hoguin
Fixes issue #47.
2011-09-06Fix the handling of the HEAD requestsAli Sabil
Responses to the HEAD requests used to include an response body.
2011-09-05Update version to 0.3.0 to continue with developmentLoïc Hoguin
2011-09-05Update version to 0.2.00.2.0Loïc Hoguin
2011-08-23Add WebSocket drafts 7, 8, 9 and 10 implementationLoïc Hoguin
The implementation is only partial for now but should work for all browsers implementing it.
2011-08-23Ensure header names are handled in a case insensitive mannerLoïc Hoguin
To this end we are formatting the header names just like OTP does except we do it for names of up to 32 characters, as there are widely used header names of more than 20 characters, the limit that OTP follows currently. An example of such header name would be Sec-Websocket-Version. The formatting itself is fairly simple: an uppercase character at the start and after dashes, everything else lowercase.
2011-08-11Use cowboy_clock types in cowboy_cookies instead of calendarLoïc Hoguin
Until calendar exports them at least.
2011-08-10Give the ListenerPid to the protocol on startupLoïc Hoguin
Also sends a message 'shoot' that can be received by the protocol to make sure Cowboy has had enough time to fully initialize the socket. This message should be received before any socket-related operations are performed. WebSocket request connections are now moved from the pool 'default' to the pool 'websocket', meaning we can have a lot of running WebSockets despite having a low 'max_connections' setting.
2011-08-10Introduce cowboy_listener for managing a listenerLoïc Hoguin
Currently only supports limiting the maximum number of connections by managing connection pools.
2011-07-26Fix cookie tests and specsLoïc Hoguin
2011-07-26Small cosmetic changes and doc update to the cookie patchLoïc Hoguin
2011-07-26Fail early in cookie-related API functionsTom Burdick
2011-07-26Implement cookies in cowboy_http_reqTom Burdick
2011-07-26Add cowboy_cookies for cookie creation and parsingTom Burdick
Based on Mochi Media, Inc.'s work in Mochiweb. Conflicts: rebar.config
2011-07-20URL decode pathsLoïc Hoguin
This fixes issue #33.
2011-07-20URL decode query stringsLoïc Hoguin
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-19Separate message and packet handling for websocketsLoïc Hoguin
Improves the readability of websocket handler code by having two functions: websocket_handle/3 handles the packets received from the socket, removing the tuple construct that was otherwise needed, so only websocket_handle(Data, Req, State) is needed now; websocket_info/3 handles the messages that the websocket handler process received, as websocket_info(Info, Req, State). Both functions return values are handled identically by Cowboy so nothing changes on that end.
2011-07-18Fail fast when a wrong type is given to API functionsLoïc Hoguin
Idea given by bfrog, fixes issue #34.
2011-07-07Call websocket_close/4 *after* throwing the errorLoïc Hoguin
This ensures that an error thrown in handler_terminate/4 will be shown after the error from handler_call/6, in the expected order. As we already call WebSocketHandler:terminate/3, this should fix issue #23.
2011-07-07Call Handler:terminate/2 even on error in Handler:handle/2Loïc Hoguin
This ensures we can cleanup what we did in Handler:init/3.
2011-07-06Move recursion out of a try .. catch block.Loïc Hoguin
Fixes issue #31. Recursion shouldn't happen in a single catch statement or inside a try .. catch statement. The only safe construct for catching exceptions and perform recursion when everything goes well is to put the recursive call inside a try .. of .. catch construct in the of .. catch block. Otherwise the stack gets filled with exception-related information since they can still be caught if we were to send them and unfold the whole thing. Thanks go to lpgauth for reporting the issue and people on IRC for explaining the hows and whys.
2011-07-06Add documentation for the public interface.Loïc Hoguin
This is probably not perfect yet but it should be better than nothing. We'll improve things with feedback received from the many users.
2011-06-30Fix the @equiv EDoc tagsLoïc Hoguin
2011-06-27Add the remaining missing specsLoïc Hoguin
Found thanks to warn_missing_spec and added with the help of typer. Eunit functions do not have specs yet however.
2011-06-27do not send ports 80 and 443 - browsers get madSteven Gravell
Browsers get mad that the returned location address is not the same as what they sent, since the :(80|443) is stripped. Add a simple eunit test due to existing ct websockets tests not covering this case.
2011-06-21Pass {ip, Ip} configuration through for TCP and SSL transportsHunter Morris
2011-06-07Fix a binary warning in cowboy_clock.Loïc Hoguin
Just a change in the order of arguments of update_rfc1123.
2011-06-06Add hibernate support for websockets.Loïc Hoguin
Return {ok, Req, State, hibernate} or {reply, Data, Req, State, hibernate} to hibernate the websocket process and save up memory and CPU. You should hibernate processes that will receive few messages. So probably most of them.
2011-06-06Add a 'profile' environment variable to start a profiler when the app starts.Loïc Hoguin
2011-06-06Compile the binary match pattern for websockets only once.Loïc Hoguin
2011-06-01Add function cowboy_http_req:compact/1 to regain memory.Loïc Hoguin
It removes all the non-essential data from the HTTP request record. It allows some applications to make better use of their memory, for example websockets which do not need to keep all the headers information and can simply discard it using this function.
2011-05-31Remove a binary warning from websocket_data by removing a byte_size call.Loïc Hoguin