解决有的谷歌浏览器连接不上websocket服务器的问题
This commit is contained in:
parent
52982cd5f4
commit
669522e203
|
@ -953,10 +953,12 @@ namespace ver_2
|
||||||
HttpHead::AnalysisHead(head, requestMethod, requestURIPath, requestURIQueryInfos,
|
HttpHead::AnalysisHead(head, requestMethod, requestURIPath, requestURIQueryInfos,
|
||||||
requestURIFragment, httpVersion, headInfos);
|
requestURIFragment, httpVersion, headInfos);
|
||||||
|
|
||||||
if (std::string::npos == HttpHead::GetValue(headInfos, "Connection").find("Upgrade"))
|
HGBase_WriteInfo(HGBASE_INFOTYPE_DESC, head.c_str());
|
||||||
return false;
|
|
||||||
if ("websocket" != HttpHead::GetValue(headInfos, "Upgrade"))
|
//if (std::string::npos == HttpHead::GetValue(headInfos, "Connection").find("Upgrade"))
|
||||||
return false;
|
// return false;
|
||||||
|
//if ("websocket" != HttpHead::GetValue(headInfos, "Upgrade"))
|
||||||
|
// return false;
|
||||||
|
|
||||||
std::string key = HttpHead::GetValue(headInfos, "Sec-WebSocket-Key");
|
std::string key = HttpHead::GetValue(headInfos, "Sec-WebSocket-Key");
|
||||||
if (key.empty())
|
if (key.empty())
|
||||||
|
|
Loading…
Reference in New Issue