Fix missing upgrade header error

This commit is contained in:
Tony Lin 2019-01-15 15:35:37 +08:00
parent 79dd766fab
commit 17b01a8c66

View File

@ -466,6 +466,8 @@ namespace ix
std::stringstream ss;
ss << "HTTP/1.1 101\r\n";
ss << "Sec-WebSocket-Accept: " << std::string(output) << "\r\n";
ss << "Upgrade: websocket\r\n";
ss << "Connection: websocket\r\n";
// Parse the client headers. Does it support deflate ?
std::string header = headers["sec-websocket-extensions"];