0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 13:10:24 +00:00

Merge branch 'websocket-compressed-metadata' of git://github.com/irccloud/cowboy

This commit is contained in:
Loïc Hoguin 2013-08-27 18:10:51 +02:00
commit b22f25d902
2 changed files with 9 additions and 3 deletions

View file

@ -28,6 +28,12 @@ Meta values
> >
> The version of the Websocket protocol being used. > The version of the Websocket protocol being used.
### websocket_compress
> Type: true | false
>
> Whether a websocket compression extension in in use.
Exports Exports
------- -------

View file

@ -123,12 +123,12 @@ websocket_extensions(State, Req) ->
deflate_frame = true, deflate_frame = true,
inflate_state = Inflate, inflate_state = Inflate,
deflate_state = Deflate deflate_state = Deflate
}, Req2}; }, cowboy_req:set_meta(websocket_compress, true, Req2)};
_ -> _ ->
{ok, State, Req2} {ok, State, cowboy_req:set_meta(websocket_compress, false, Req2)}
end; end;
_ -> _ ->
{ok, State, Req} {ok, State, cowboy_req:set_meta(websocket_compress, false, Req)}
end. end.
-spec handler_init(#state{}, Req, any()) -spec handler_init(#state{}, Req, any())