summaryrefslogtreecommitdiff
path: root/indra/llmessage/llsdrpcclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/llsdrpcclient.h')
-rwxr-xr-x[-rw-r--r--]indra/llmessage/llsdrpcclient.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/indra/llmessage/llsdrpcclient.h b/indra/llmessage/llsdrpcclient.h
index 9fb49a5c33..c4e0333ca3 100644..100755
--- a/indra/llmessage/llsdrpcclient.h
+++ b/indra/llmessage/llsdrpcclient.h
@@ -239,12 +239,19 @@ public:
LLSDRPCClientFactory(const std::string& fixed_url) : mURL(fixed_url) {}
virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const
{
- lldebugs << "LLSDRPCClientFactory::build" << llendl;
+ LL_DEBUGS() << "LLSDRPCClientFactory::build" << LL_ENDL;
+ LLURLRequest* http(new LLURLRequest(HTTP_POST));
+ if(!http->isValid())
+ {
+ LL_WARNS() << "Creating LLURLRequest failed." << LL_ENDL ;
+ delete http;
+ return false;
+ }
+
LLIOPipe::ptr_t service(new Client);
- chain.push_back(service);
- LLURLRequest* http(new LLURLRequest(LLURLRequest::HTTP_POST));
+ chain.push_back(service);
LLIOPipe::ptr_t http_pipe(http);
- http->addHeader("Content-Type: text/llsd");
+ http->addHeader(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_LLSD);
if(mURL.empty())
{
chain.push_back(LLIOPipe::ptr_t(new LLContextURLExtractor(http)));
@@ -282,12 +289,19 @@ public:
LLXMLSDRPCClientFactory(const std::string& fixed_url) : mURL(fixed_url) {}
virtual bool build(LLPumpIO::chain_t& chain, LLSD context) const
{
- lldebugs << "LLXMLSDRPCClientFactory::build" << llendl;
+ LL_DEBUGS() << "LLXMLSDRPCClientFactory::build" << LL_ENDL;
+
+ LLURLRequest* http(new LLURLRequest(HTTP_POST));
+ if(!http->isValid())
+ {
+ LL_WARNS() << "Creating LLURLRequest failed." << LL_ENDL ;
+ delete http;
+ return false ;
+ }
LLIOPipe::ptr_t service(new Client);
- chain.push_back(service);
- LLURLRequest* http(new LLURLRequest(LLURLRequest::HTTP_POST));
+ chain.push_back(service);
LLIOPipe::ptr_t http_pipe(http);
- http->addHeader("Content-Type: text/xml");
+ http->addHeader(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
if(mURL.empty())
{
chain.push_back(LLIOPipe::ptr_t(new LLContextURLExtractor(http)));