(http server) read body request when the Content-Length is specified + set timeout to read the request to 30 seconds max by default, and make it configurable as a constructor parameter

This commit is contained in:
Benjamin Sergeant committed 2020-09-12 14:17:06 -07:00
1 parent b04e5c5529
commit 128bc0afa9
6 files changed
+21 -9

No files matched your search

+1 -1
View File
@@ -118,7 +118,7 @@ namespace ix
{
public:
static std::tuple<bool, std::string, HttpRequestPtr> parseRequest(
std::unique_ptr<Socket>& socket);
std::unique_ptr<Socket>& socket, int timeoutSecs);
static bool sendResponse(HttpResponsePtr response, std::unique_ptr<Socket>& socket);
static std::pair<std::string, int> parseStatusLine(const std::string& line);