diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2012-01-30 22:27:01 -0500 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2012-01-30 22:27:01 -0500 |
commit | a39937f9303ce2100ebb40d6fcaa8d36a14e3cb7 (patch) | |
tree | 3c0d951cafadbd90c736cfbb9e2e4329d05407c7 /indra/llmessage/llsdrpcclient.h | |
parent | 6298daf266369dbd3600c5fdf287f9c680b2a897 (diff) | |
parent | bd4c629e38aa2ab7223a5ef3b8e23ad91229b512 (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()) |