diff --git a/include/crow/parser.h b/include/crow/parser.h index 5a365bb3a..7099e8c7c 100644 --- a/include/crow/parser.h +++ b/include/crow/parser.h @@ -16,9 +16,8 @@ namespace crow template struct HTTPParser : public http_parser { - static int on_message_begin(http_parser* self_) + static int on_message_begin(http_parser*) { - HTTPParser* self = static_cast(self_); return 0; } static int on_method(http_parser* self_) diff --git a/tests/unittest.cpp b/tests/unittest.cpp index 4729bfed7..7df62ea0b 100644 --- a/tests/unittest.cpp +++ b/tests/unittest.cpp @@ -2472,7 +2472,7 @@ TEST_CASE("stream_response") TEST_CASE("websocket") { - static std::string http_message = "GET /ws HTTP/1.1\r\nConnection: keep-alive, Upgrade\r\nupgrade: websocket\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nSec-WebSocket-Version: 13\r\n\r\n"; + static std::string http_message = "GET /ws HTTP/1.1\r\nConnection: keep-alive, Upgrade\r\nupgrade: websocket\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nSec-WebSocket-Version: 13\r\nHost: localhost\r\n\r\n"; static bool connected{false}; @@ -2635,7 +2635,7 @@ TEST_CASE("websocket") TEST_CASE("websocket_max_payload") { - static std::string http_message = "GET /ws HTTP/1.1\r\nConnection: keep-alive, Upgrade\r\nupgrade: websocket\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nSec-WebSocket-Version: 13\r\n\r\n"; + static std::string http_message = "GET /ws HTTP/1.1\r\nConnection: keep-alive, Upgrade\r\nupgrade: websocket\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nSec-WebSocket-Version: 13\r\nHost: localhost\r\n\r\n"; static bool connected{false};