improve some websocket error messages + add a utility function with unittest to parse status line and stop using scanf which triggers warnings on Windows

This commit is contained in:
Benjamin Sergeant
2019-09-09 21:23:57 -07:00
parent 6c0890594b
commit 64d3c99f99
6 changed files with 55 additions and 7 deletions

View File

@ -115,6 +115,8 @@ namespace ix
std::shared_ptr<Socket> socket);
static bool sendResponse(HttpResponsePtr response, std::shared_ptr<Socket> socket);
static std::pair<std::string, int> parseStatusLine(
const std::string& line);
static std::tuple<std::string, std::string, std::string> parseRequestLine(
const std::string& line);
static std::string trim(const std::string& str);