Mercurial > hg > orthanc
comparison Core/HttpClient.cpp @ 3432:297ad330900c
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 17 Jun 2019 23:37:07 +0200 |
parents | 6add197274b1 |
children | 96780208dbd7 |
comparison
equal
deleted
inserted
replaced
3431:e0841192d7d0 | 3432:297ad330900c |
---|---|
44 #include <curl/curl.h> | 44 #include <curl/curl.h> |
45 #include <boost/algorithm/string/predicate.hpp> | 45 #include <boost/algorithm/string/predicate.hpp> |
46 #include <boost/thread/mutex.hpp> | 46 #include <boost/thread/mutex.hpp> |
47 | 47 |
48 | 48 |
49 // Default timeout = 60 seconds (in Orthanc <= 1.5.6, it was 10 seconds) | |
50 static const unsigned int DEFAULT_HTTP_TIMEOUT = 60; | |
51 | |
52 | |
49 #if ORTHANC_ENABLE_PKCS11 == 1 | 53 #if ORTHANC_ENABLE_PKCS11 == 1 |
50 # include "Pkcs11.h" | 54 # include "Pkcs11.h" |
51 #endif | 55 #endif |
52 | 56 |
53 | 57 |
816 } | 820 } |
817 | 821 |
818 // Set timeouts | 822 // Set timeouts |
819 if (timeout_ <= 0) | 823 if (timeout_ <= 0) |
820 { | 824 { |
821 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_TIMEOUT, 10)); /* default: 10 seconds */ | 825 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_TIMEOUT, DEFAULT_HTTP_TIMEOUT)); |
822 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CONNECTTIMEOUT, 10)); /* default: 10 seconds */ | 826 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CONNECTTIMEOUT, DEFAULT_HTTP_TIMEOUT)); |
823 } | 827 } |
824 else | 828 else |
825 { | 829 { |
826 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_TIMEOUT, timeout_)); | 830 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_TIMEOUT, timeout_)); |
827 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CONNECTTIMEOUT, timeout_)); | 831 CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_CONNECTTIMEOUT, timeout_)); |