Answer the question
In order to leave comments, you need to log in
[Web Sockets] Mozilla sends a request on a new connection after a handshake. What to answer her?
Good day!
Today I ran into a problem. There is a server that handles connections via web sockets. When establishing a connection, the mozilla makes two requests, the first one is actually a handshake, the server responds to it, but then for some reason it closes the current connection, opens a new one and sends it like this: and everything would be fine if everything happened within the same connection. But no, she closes it and opens a new one. Accordingly, to determine what kind of nonsense it came from and where it came from. Chrome doesn't suffer like that. Who knows why mozilla does such a thing? Am I missing something in the protocol?
Requests:
[{<<"Host">>,<<"host.ru:111">>},
{<<"User-Agent">>,
<<"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0">>},
{<<"Accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8">>},
{<<"Accept-Language">>,<<"ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3">>},
{<<"Accept-Encoding">>,<<"gzip, deflate">>},
{<<"Sec-WebSocket-Version">>,<<"13">>},
{<<"Origin">>,<<"http://host2.ru">>},
{<<"Sec-WebSocket-Extensions">>,<<"permessage-deflate">>},
{<<"Sec-WebSocket-Key">>,<<"IsoYCcUHGPU/+m1A72/Mxw==">>},
{<<"Cookie">>,
<<"">>},
{<<"Connection">>,<<"keep-alive, Upgrade">>},
{<<"Pragma">>,<<"no-cache">>},
{<<"Cache-Control">>,<<"no-cache">>},
{<<"Upgrade">>,<<"websocket">>}]
[{<<"Host">>,<<"host.ru:111">>},
{<<"User-Agent">>,
<<"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0">>},
{<<"Accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8">>},
{<<"Accept-Language">>,<<"ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3">>},
{<<"Accept-Encoding">>,<<"gzip, deflate">>},
{<<"Referer">>,<<"http://host2.ru/">>},
{<<"Cookie">>,
<<"">>},
{<<"Connection">>,<<"keep-alive">>}]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question