diff options
author | B. Stack <bgstack15@gmail.com> | 2022-03-09 14:43:11 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-03-09 14:43:11 +0000 |
commit | 106716ec0daedf3a19bcc0036e81305968c543ee (patch) | |
tree | 9e6113f824015cdbf5c954f598d6b58f813a7984 /zen | |
parent | Merge branch 'b11.17' into 'master' (diff) | |
parent | add upstream 11.18 (diff) | |
download | FreeFileSync-11.18.tar.gz FreeFileSync-11.18.tar.bz2 FreeFileSync-11.18.zip |
Merge branch 'b11.18' into 'master'11.18
add upstream 11.18
See merge request opensource-tracking/FreeFileSync!42
Diffstat (limited to 'zen')
-rw-r--r-- | zen/http.cpp | 9 |
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."); |