0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00
Commit graph

5 commits

Author SHA1 Message Date
Loïc Hoguin
d3dcaf109b Rename cowboy_http_req to cowboy_req 2012-08-27 13:28:57 +02:00
Loïc Hoguin
cc2e084d45 Update behaviours for R15B+
This effectively drops the R14B compatibility.

The cowboy_req:req() type will be introduced in a future commit.
It refers to the #http_req{} record.
2012-08-27 12:50:00 +02:00
Loïc Hoguin
ad87fee0af Fix a websocket test handler that was throwing an unwanted error
The test still worked because we expect the websocket connection
to fail, but it didn't fail exactly the way we wanted it to.
2011-11-28 09:14:07 +01:00
Loïc Hoguin
81cc99d10b Add shortcuts to reply functions
New functions are reply/2, reply/3, chunked_reply/2 in cowboy_http_req.
2011-10-13 16:16:53 +02:00
Loïc Hoguin
25ae2028d6 Add {shutdown, Req} to websocket_init/3 to fail a websocket upgrade
This change allows application developers to refuse websocket upgrades
by returning {shutdown, Req}. The application can also send a reply
with a custom error before returning from websocket_init/3, otherwise
an error 400 is sent.

Note that right now Cowboy closes the connection immediately. Also note
that neither terminate/3 nor websocket_terminate/3 will be called when
the connection is shutdown by websocket_init/3.
2011-10-10 09:09:15 +02:00