[erlang-bugs] erlang:decode_packet - wrong parsing of Sec-WebSock-Accept header

arif@REDACTED arif@REDACTED
Tue Jan 29 11:31:10 CET 2013


Hi,

In R15B (erts-5.9) erlang:decode_packet/3 seems to be making an error
parsing the Sec-WebSock-Accept header

43> erlang:decode_packet(httph, <<"Sec-WebSocket-Accept:
whatever\r\n\r\n">>, []).
{ok,{http_header,0,"Sec-Websocket-Accept",undefined,
                 "whatever"},
    <<"\r\n">>}
44>

One, it doesn't parse it as an atom, but as a string (but that much can be
guessed from the documentation).

Two, the character S in WebSocket is parsed as lowercase instead of the
uppercase it is in the parsed string.

Best regards
Arif





More information about the erlang-bugs mailing list