Adds hybi 00 handshake support, begins work on hybi 00 frame support

This commit is contained in:
Peter Thorson
2011-11-07 17:28:28 -06:00
parent 63eece760e
commit 2bccdb21cb
10 changed files with 755 additions and 30 deletions

View File

@@ -210,7 +210,7 @@ public:
throw(handshake_error(err.str(),http::status_code::BAD_REQUEST));
}
if (handshake.header("Sec-WebSocket-Key") == "") {
if (handshake.header("Sec-WebSocket-Key") == "" && handshake.header("Sec-WebSocket-Key1") == "" && handshake.header("Sec-WebSocket-Key2") == "") {
throw(handshake_error("Required Sec-WebSocket-Key header is missing",http::status_code::BAD_REQUEST));
}
@@ -218,7 +218,7 @@ public:
if (h == "") {
// TODO: if we want to support draft 00 this line should set version to 0
// rather than bail
throw(handshake_error("Required Sec-WebSocket-Version header is missing",http::status_code::BAD_REQUEST));
//throw(handshake_error("Required Sec-WebSocket-Version header is missing",http::status_code::BAD_REQUEST));
} else {
int version = atoi(h.c_str());