Merge pull request #3834 from j-selby/fix-cpp-httplib

Update cpp-httplib for gzip + chunked encoding fixes
This commit is contained in:
James Rowe 2018-06-26 09:57:08 -06:00 committed by GitHub
commit 5e641d16d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 533 additions and 232 deletions

View file

@ -31,14 +31,12 @@ std::unique_ptr<httplib::Client> GetClientFor(const LUrlParser::clParseURL& pars
if (!parsedUrl.GetPort(&port)) {
port = HTTP_PORT;
}
return std::make_unique<hl::Client>(parsedUrl.m_Host.c_str(), port, TIMEOUT_SECONDS,
hl::HttpVersion::v1_1);
return std::make_unique<hl::Client>(parsedUrl.m_Host.c_str(), port, TIMEOUT_SECONDS);
} else if (parsedUrl.m_Scheme == "https") {
if (!parsedUrl.GetPort(&port)) {
port = HTTPS_PORT;
}
return std::make_unique<hl::SSLClient>(parsedUrl.m_Host.c_str(), port, TIMEOUT_SECONDS,
hl::HttpVersion::v1_1);
return std::make_unique<hl::SSLClient>(parsedUrl.m_Host.c_str(), port, TIMEOUT_SECONDS);
} else {
NGLOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme);
return nullptr;