fixed unit-tests and warnings

This commit is contained in:
The-EDev 2022-08-22 00:38:03 +03:00
parent fba01dc76d
commit 0aa3ab94be
No known key found for this signature in database
GPG Key ID: 51C45DC0C413DCD9
2 changed files with 3 additions and 4 deletions

View File

@ -16,9 +16,8 @@ namespace crow
template<typename Handler>
struct HTTPParser : public http_parser
{
static int on_message_begin(http_parser* self_)
static int on_message_begin(http_parser*)
{
HTTPParser* self = static_cast<HTTPParser*>(self_);
return 0;
}
static int on_method(http_parser* self_)

View File

@ -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};