From 6f4d36634e980bb989b9a8b762c3c622804c43dd Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 16 Mar 2015 17:14:34 -0700 Subject: Removal of RPCXML dep on LLCurl switching to LLCore::Html --- indra/llmessage/llhttpclient.cpp | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'indra/llmessage/llhttpclient.cpp') diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 200116337d..27c94b1182 100755 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -38,6 +38,10 @@ #include "lluri.h" #include "message.h" +#include "httpcommon.h" +#include "httprequest.h" +#include "httpoptions.h" + #include @@ -214,6 +218,51 @@ void LLHTTPClient::setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback cal LLHTTPClient::mCertVerifyCallback = callback; } +#if 0 +typedef std::shared_ptr HttpRequestPtr_t; +typedef std::unique_ptr HttpOptionsPtr_t; +typedef std::unique_ptr InjectorPtr_t; + +static void request_( + const std::string& url, + EHTTPMethod method, + Injector* body_injector, + LLCurl::ResponderPtr responder, + const F32 timeout = HTTP_REQUEST_EXPIRY_SECS, + const LLSD& headers = LLSD(), + bool follow_redirects = true + ) +{ + HttpRequestPtr_t httpReq = HttpRequestPtr_t(new LLCore::HttpRequest()); + + HttpOptionsPtr_t httpOpts = HttpOptionsPtr_t(new LLCore::HttpOptions()); + + httpOpts->setFollowRedirects(follow_redirects); + httpOpts->setRetries(12); + httpOpts->setUseRetryAfter(true); + // for the moment lets just truncate. 60 seconds vs 60.5 seconds + httpOpts->setTransferTimeout((unsigned int)timeout); + + switch (method) + { + case HTTP_GET: + httpReq->requestGet(0, 0, url, httpOpts.get(), headers, handler); + break; + case HTTP_HEAD: + httpReq->requestHead(0, 0, url, httpOpts.get(), headers, handler); + break; + case HTTP_PUT: + httpReq->requestPut(0, 0, url, ); + break; + case HTTP_POST: + httpReq->requestPost(0, 0, url, null, httpOpts.get(), headers, handler); + break; + } + + +} +#endif + static void request( const std::string& url, EHTTPMethod method, -- cgit v1.2.3 From d46fe1a1bb0c375ebcfe3c1fe9701e37135acd65 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 23 Mar 2015 14:48:34 -0700 Subject: Microsoft is not nearly picky enough. Headder issues caught by gcc MS likes fine. --- indra/llmessage/llhttpclient.cpp | 45 ---------------------------------------- 1 file changed, 45 deletions(-) (limited to 'indra/llmessage/llhttpclient.cpp') diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 27c94b1182..b4a76cb808 100755 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -218,51 +218,6 @@ void LLHTTPClient::setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback cal LLHTTPClient::mCertVerifyCallback = callback; } -#if 0 -typedef std::shared_ptr HttpRequestPtr_t; -typedef std::unique_ptr HttpOptionsPtr_t; -typedef std::unique_ptr InjectorPtr_t; - -static void request_( - const std::string& url, - EHTTPMethod method, - Injector* body_injector, - LLCurl::ResponderPtr responder, - const F32 timeout = HTTP_REQUEST_EXPIRY_SECS, - const LLSD& headers = LLSD(), - bool follow_redirects = true - ) -{ - HttpRequestPtr_t httpReq = HttpRequestPtr_t(new LLCore::HttpRequest()); - - HttpOptionsPtr_t httpOpts = HttpOptionsPtr_t(new LLCore::HttpOptions()); - - httpOpts->setFollowRedirects(follow_redirects); - httpOpts->setRetries(12); - httpOpts->setUseRetryAfter(true); - // for the moment lets just truncate. 60 seconds vs 60.5 seconds - httpOpts->setTransferTimeout((unsigned int)timeout); - - switch (method) - { - case HTTP_GET: - httpReq->requestGet(0, 0, url, httpOpts.get(), headers, handler); - break; - case HTTP_HEAD: - httpReq->requestHead(0, 0, url, httpOpts.get(), headers, handler); - break; - case HTTP_PUT: - httpReq->requestPut(0, 0, url, ); - break; - case HTTP_POST: - httpReq->requestPost(0, 0, url, null, httpOpts.get(), headers, handler); - break; - } - - -} -#endif - static void request( const std::string& url, EHTTPMethod method, -- cgit v1.2.3