From fc38a6d29b1f284da0b211b7bd84b48572066cda Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 8 Mar 2022 16:53:10 -0500 Subject: add upstream 11.18 --- zen/http.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'zen') diff --git a/zen/http.cpp b/zen/http.cpp index 6ce6c324..24c5aa73 100644 --- a/zen/http.cpp +++ b/zen/http.cpp @@ -12,7 +12,7 @@ using namespace zen; -constexpr std::chrono::seconds HTTP_ACCESS_TIME_OUT(20); +const int HTTP_ACCESS_TIME_OUT_SEC = 20; @@ -102,7 +102,7 @@ public: } }; - HttpSession httpSession(server, useTls, caCertFilePath, HTTP_ACCESS_TIME_OUT); //throw SysError + HttpSession httpSession(server, useTls, caCertFilePath); //throw SysError auto writeResponse = [&](std::span buf) { @@ -112,11 +112,12 @@ public: return asyncStreamOut->write(buf.data(), buf.size()); //throw ThreadStopRequest }; - httpSession.perform(serverRelPath, //throw SysError, ThreadStopRequest + httpSession.perform(serverRelPath, curlHeaders, extraOptions, writeResponse /*throw ThreadStopRequest*/, nullptr /*readRequest*/, - onHeaderData /*throw SysError*/); + onHeaderData /*throw SysError*/, + HTTP_ACCESS_TIME_OUT_SEC); //throw SysError, ThreadStopRequest if (!headerReceived) throw SysError(L"HTTP response is missing header."); -- cgit