Age | Commit message (Collapse) | Author |
|
The server should not send a response if there wasn't at least
the beginning of a request sent (the Request-Line).
|
|
Thanks to @nivertech for pointing it out in ticket #61.
|
|
Thanks to @klaar for pointing it out in ticket #59.
|
|
|
|
|
|
|
|
|
|
|
|
Making it look more like the websocket handler error messages.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Also improve the documentation about hibernate.
|
|
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.
|
|
Fixes issue #47.
|
|
|
|
Fix the handling of HEAD requests
|
|
Responses to the HEAD requests used to include an response body.
|
|
|
|
|
|
|
|
We want to run 'make tests' and not that rebar command.
Also remove R14B as quoted doesn't work with it.
|
|
|
|
The implementation is only partial for now but should work for
all browsers implementing it.
|
|
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.
|
|
Until calendar exports them at least.
|
|
|
|
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.
|
|
Currently only supports limiting the maximum number of
connections by managing connection pools.
|
|
|
|
|
|
|
|
|
|
Based on Mochi Media, Inc.'s work in Mochiweb.
Conflicts:
rebar.config
|
|
Magnus Klaar updated the PropEr tests and it should be fine now.
|
|
Mostly thanks to Magnus Klaar as it took me a while to figure
out how PropEr tests had to be written.
|
|
This fixes issue #33.
|
|
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.
|
|
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.
|
|
Idea given by bfrog, fixes issue #34.
|
|
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.
|
|
This ensures we can cleanup what we did in Handler:init/3.
|
|
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.
|
|
This is probably not perfect yet but it should be better than
nothing. We'll improve things with feedback received from the
many users.
|
|
|
|
|
|
Found thanks to warn_missing_spec and added with the help of typer.
Eunit functions do not have specs yet however.
|
|
do not send ports 80 and 443 - browsers get mad
|