diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-06-07 05:47:50 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-06-07 05:47:50 -0400 |
| commit | ce563795e1f5d7493b975393bea9ec5cab90fd6a (patch) | |
| tree | edc0b403ee80989bfa55b6d1cae3680093fb61fc /indra/llmessage/llhttpclient.cpp | |
| parent | d167ebe35f8cdec1ca88e0d817e2878f14a5aa68 (diff) | |
| parent | 89ea7ccfc7fd4c33eab4ad9123141fa40231a00d (diff) | |
MAINT-1144: Merge llhttpclient_test.cpp fix back to tip
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
| -rw-r--r-- | indra/llmessage/llhttpclient.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index dd4e3a6300..0c325a68aa 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -158,7 +158,7 @@ namespace if(fstream.is_open()) { fstream.seekg(0, std::ios::end); - U32 fileSize = fstream.tellg(); + U32 fileSize = (U32)fstream.tellg(); fstream.seekg(0, std::ios::beg); std::vector<char> fileBuffer(fileSize); fstream.read(&fileBuffer[0], fileSize); @@ -228,6 +228,12 @@ static void request( LLPumpIO::chain_t chain; LLURLRequest* req = new LLURLRequest(method, url); + if(!req->isValid())//failed + { + delete req ; + return ; + } + req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req); @@ -423,7 +429,9 @@ static LLSD blocking_request( { lldebugs << "blockingRequest of " << url << llendl; char curl_error_buffer[CURL_ERROR_SIZE] = "\0"; - CURL* curlp = curl_easy_init(); + CURL* curlp = LLCurl::newEasyHandle(); + llassert_always(curlp != NULL) ; + LLHTTPBuffer http_buffer; std::string body_str; @@ -517,7 +525,7 @@ static LLSD blocking_request( } // * Cleanup - curl_easy_cleanup(curlp); + LLCurl::deleteEasyHandle(curlp); return response; } |
