diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-02-02 10:57:09 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-02-02 10:57:09 -0500 |
commit | b9376ab990707aafb041ef630d321b886bed6128 (patch) | |
tree | 75cb218be1507c60d79ed543a13ca6bcae1d6e54 /indra/llmessage/llsdrpcclient.h | |
parent | b0d94fa706efd7794b4ba5b9160ddcfc33233ca4 (diff) | |
parent | 0e609cc95b08c28bd51f5ab48160fd93df7a6b28 (diff) |
merge
Diffstat (limited to 'indra/llmessage/llsdrpcclient.h')
-rw-r--r-- | indra/llmessage/llsdrpcclient.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/indra/llmessage/llsdrpcclient.h b/indra/llmessage/llsdrpcclient.h index 9fb49a5c33..0cecf4f688 100644 --- a/indra/llmessage/llsdrpcclient.h +++ b/indra/llmessage/llsdrpcclient.h @@ -240,9 +240,16 @@ public: virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { lldebugs << "LLSDRPCClientFactory::build" << llendl; - LLIOPipe::ptr_t service(new Client); - chain.push_back(service); LLURLRequest* http(new LLURLRequest(LLURLRequest::HTTP_POST)); + if(!http->isValid()) + { + llwarns << "Creating LLURLRequest failed." << llendl ; + delete http; + return false; + } + + LLIOPipe::ptr_t service(new Client); + chain.push_back(service); LLIOPipe::ptr_t http_pipe(http); http->addHeader("Content-Type: text/llsd"); if(mURL.empty()) @@ -283,9 +290,16 @@ public: virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const { lldebugs << "LLXMLSDRPCClientFactory::build" << llendl; - LLIOPipe::ptr_t service(new Client); - chain.push_back(service); + LLURLRequest* http(new LLURLRequest(LLURLRequest::HTTP_POST)); + if(!http->isValid()) + { + llwarns << "Creating LLURLRequest failed." << llendl ; + delete http; + return false ; + } + LLIOPipe::ptr_t service(new Client); + chain.push_back(service); LLIOPipe::ptr_t http_pipe(http); http->addHeader("Content-Type: text/xml"); if(mURL.empty()) |