summaryrefslogtreecommitdiff
path: root/zen/http.cpp
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-03-09 14:43:11 +0000
committerB. Stack <bgstack15@gmail.com>2022-03-09 14:43:11 +0000
commit106716ec0daedf3a19bcc0036e81305968c543ee (patch)
tree9e6113f824015cdbf5c954f598d6b58f813a7984 /zen/http.cpp
parentMerge branch 'b11.17' into 'master' (diff)
parentadd upstream 11.18 (diff)
downloadFreeFileSync-106716ec0daedf3a19bcc0036e81305968c543ee.tar.gz
FreeFileSync-106716ec0daedf3a19bcc0036e81305968c543ee.tar.bz2
FreeFileSync-106716ec0daedf3a19bcc0036e81305968c543ee.zip
Merge branch 'b11.18' into 'master'11.18
add upstream 11.18 See merge request opensource-tracking/FreeFileSync!42
Diffstat (limited to 'zen/http.cpp')
-rw-r--r--zen/http.cpp9
1 files changed, 5 insertions, 4 deletions
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<const char> 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.");
bgstack15