diff options
author | Don Kjer <don@lindenlab.com> | 2007-04-05 16:23:03 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-04-05 16:23:03 +0000 |
commit | ae588e76f1c61bf489dfb2cdcab371f0b34118f2 (patch) | |
tree | 77c5fd9a185659d598d08d274badd08e551ed137 /indra/llmessage/llhttpclient.cpp | |
parent | 2ce0fc5f185f22be79b9be5406b76c97ed91ee01 (diff) |
svn merge -r 58913:59058 svn+ssh://svn/svn/linden/branches/rez-content-loss-1 into release
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
-rw-r--r-- | indra/llmessage/llhttpclient.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 0929f93dc1..121cbd2e68 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -20,7 +20,7 @@ #include <curl/curl.h> -static const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; +const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f; static std::string gCABundle; @@ -214,7 +214,7 @@ namespace } static void request(const std::string& url, LLURLRequest::ERequestAction method, - Injector* body_injector, LLHTTPClient::ResponderPtr responder) + Injector* body_injector, LLHTTPClient::ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) { if (!LLHTTPClient::hasPump()) { @@ -239,12 +239,12 @@ static void request(const std::string& url, LLURLRequest::ERequestAction method, } chain.push_back(LLIOPipe::ptr_t(req)); - theClientPump->addChain(chain, HTTP_REQUEST_EXPIRY_SECS); + theClientPump->addChain(chain, timeout); } -void LLHTTPClient::get(const std::string& url, ResponderPtr responder) +void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_GET, NULL, responder); + request(url, LLURLRequest::HTTP_GET, NULL, responder, timeout); } // A simple class for managing data returned from a curl http request. @@ -325,36 +325,36 @@ LLSD LLHTTPClient::blockingGet(const std::string& url) return response; } -void LLHTTPClient::put(const std::string& url, const LLSD& body, ResponderPtr responder) +void LLHTTPClient::put(const std::string& url, const LLSD& body, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder); + request(url, LLURLRequest::HTTP_PUT, new LLSDInjector(body), responder, timeout); } -void LLHTTPClient::post(const std::string& url, const LLSD& body, ResponderPtr responder) +void LLHTTPClient::post(const std::string& url, const LLSD& body, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder); + request(url, LLURLRequest::HTTP_POST, new LLSDInjector(body), responder, timeout); } -void LLHTTPClient::post(const std::string& url, const U8* data, S32 size, ResponderPtr responder) +void LLHTTPClient::post(const std::string& url, const U8* data, S32 size, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder); + request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, timeout); } -void LLHTTPClient::del(const std::string& url, ResponderPtr responder) +void LLHTTPClient::del(const std::string& url, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_DELETE, NULL, responder); + request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout); } #if 1 -void LLHTTPClient::postFile(const std::string& url, const std::string& filename, ResponderPtr responder) +void LLHTTPClient::postFile(const std::string& url, const std::string& filename, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder); + request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, timeout); } void LLHTTPClient::postFile(const std::string& url, const LLUUID& uuid, - LLAssetType::EType asset_type, ResponderPtr responder) + LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout) { - request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder); + request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, timeout); } #endif |