Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/Simple-WebSocket-Server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoreidheim <eidheim@gmail.com>2017-07-19 09:30:58 +0300
committereidheim <eidheim@gmail.com>2017-07-19 09:30:58 +0300
commit6deb487a1ab266b9d7347f4e1d9fafc07e267c23 (patch)
treee6518fcf5e3260bbf3632eadcf16b4d0941f23f4 /tests
parent127f177a34d8f19ed32218be0f4fbe9693ca8760 (diff)
Moved request and response message parsing to utility. Also now uses the same utility/status_code.hpp as in Simple-Web-Server
Diffstat (limited to 'tests')
-rw-r--r--tests/parse_test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/parse_test.cpp b/tests/parse_test.cpp
index 41031e0..6689773 100644
--- a/tests/parse_test.cpp
+++ b/tests/parse_test.cpp
@@ -23,7 +23,8 @@ public:
ss << "TestHeader3:test3b\r\n";
ss << "\r\n";
- connection->parse_handshake();
+ std::istream stream(&connection->read_buffer);
+ assert(RequestMessage::parse(stream, connection->method, connection->path, connection->query_string, connection->http_version, connection->header));
assert(connection->method == "GET");
assert(connection->path == "/test/");
@@ -92,7 +93,7 @@ public:
stream << "TestHeader3:test3b\r\n";
stream << "\r\n";
- connection->parse_handshake();
+ assert(ResponseMessage::parse(*connection->message, connection->http_version, connection->status_code, connection->header));
assert(connection->header.size() == 4);
auto header_it = connection->header.find("TestHeader");