Age | Commit message (Collapse) | Author |
|
Also add a call to compact/1 in the websocket test handler so we may
catch bugs related to it faster later on.
|
|
From the RFC:
The HEAD method is identical to GET except that the server MUST NOT
return a message-body in the response. The metainformation contained
in the HTTP headers in response to a HEAD request SHOULD be identical
to the information sent in response to a GET request.
|
|
|
|
Replaces the 'Connection' interpretation in cowboy_http_protocol
from raw value to the parsed value, looking for a single token
matching close/keep-alive instead of the whole raw value (which
could contain more than one token, for example with Firefox 6+
using websocket).
Introduce the functions cowboy_http_req:parse_header/2 and /3
to semantically parse the header values and return a proper
Erlang term.
|
|
|
|
Use the Req connection information instead.
|
|
And use a proper cowboy_http_req:reply/4 call for the 204 response.
|
|
|
|
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.
|