aboutsummaryrefslogtreecommitdiffstats
path: root/test/websocket_handler_init_shutdown.erl
AgeCommit message (Collapse)Author
2011-10-13Add shortcuts to reply functionsLoïc Hoguin
New functions are reply/2, reply/3, chunked_reply/2 in cowboy_http_req.
2011-10-10Add {shutdown, Req} to websocket_init/3 to fail a websocket upgradeLoïc Hoguin
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.