diff options
author | Loïc Hoguin <[email protected]> | 2012-08-27 12:28:59 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-08-27 12:28:59 +0200 |
commit | 10adcdbc7dce733fa300fffdd11ce24ae7c17e38 (patch) | |
tree | 2d71106964b60d94abcb64adc592de63871dab15 /src | |
parent | a5e75219f0bb9602178314a00eb9e0f9c22bcac6 (diff) | |
download | cowboy-10adcdbc7dce733fa300fffdd11ce24ae7c17e38.tar.gz cowboy-10adcdbc7dce733fa300fffdd11ce24ae7c17e38.tar.bz2 cowboy-10adcdbc7dce733fa300fffdd11ce24ae7c17e38.zip |
Change a websocket error from {error, protocol} to {error, badframe}
For improved consistency.
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_http_websocket.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_http_websocket.erl b/src/cowboy_http_websocket.erl index 0e1ecfc..4509479 100644 --- a/src/cowboy_http_websocket.erl +++ b/src/cowboy_http_websocket.erl @@ -342,7 +342,7 @@ websocket_data(State=#state{frag_state={nofin, Opcode, Payloads}}, Req, %% control messages MUST NOT use 7+16 bits or 7+64 bits payload length prefixes websocket_data(State, Req, HandlerState, _Fin, _Rsv, Opcode, _Mask, PayloadLen, _Rest, _Data) when Opcode >= 8, PayloadLen > 125 -> - websocket_close(State, Req, HandlerState, {error, protocol}); + websocket_close(State, Req, HandlerState, {error, badframe}); %% unfragmented message. unmask and dispatch the message. websocket_data(State=#state{version=Version}, Req, HandlerState, _Fin=1, _Rsv=0, Opcode, Mask, PayloadLen, Rest, Data) when Version =/= 0 -> |