コード例 #1
0
TEST_F (WebSockServerTester, FailedHandshakes_NoKey) {
    
    HTTP::Request request (HTTP::Method::GET, "/");
    request.SetHeader (HTTP::Header ("Connection", "Upgrade"));
    request.SetHeader (HTTP::Header ("Upgrade", "websocket"));
    VerifyBadRequest (request);
}
コード例 #2
0
TEST_F (WebSockServerTester, FailedHandshakes_NoWebSocket) {
    
    HTTP::Request request (HTTP::Method::GET, "/");
    request.SetHeader (HTTP::Header ("Connection", "Upgrade"));
    request.SetHeader (HTTP::Header ("Sec-WebSocket-Key", "dGhlIHNhbXBsZSBub25jZQ=="));
    VerifyBadRequest (request);
}