diff options
author | Kyle Ambroff <ambroff@lindenlab.com> | 2008-06-21 07:39:52 +0000 |
---|---|---|
committer | Kyle Ambroff <ambroff@lindenlab.com> | 2008-06-21 07:39:52 +0000 |
commit | dc3f5ff87cfa085998bf69db6dedad45440419d3 (patch) | |
tree | e6c54376390a110e0e91ea0139ce6bb54925ffae /indra/llmessage/llcurl.cpp | |
parent | af080d1c62f1a2cdc17c3870427f07ad0cf9534f (diff) |
svn merge -r90150:90340 svn+ssh://svn.lindenlab.com/svn/linden/branches/qar-699_combo-merge --> release
QAR-699 - Combo merge for QAR-687, QAR-637, QAR-586
* QAR-687 - Test build with libs on S3
* QAR-637 Test dynamic sound throttle
* QAR-586 Test new http features branch
Diffstat (limited to 'indra/llmessage/llcurl.cpp')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 54 |
1 files changed, 19 insertions, 35 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index e282f49438..5a426c7238 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -113,6 +113,15 @@ LLCurl::Responder::~Responder() } // virtual +void LLCurl::Responder::error( + U32 status, + const std::string& reason, + const LLSD&) +{ + error(status, reason); +} + +// virtual void LLCurl::Responder::error(U32 status, const std::string& reason) { llinfos << status << ": " << reason << llendl; @@ -124,38 +133,16 @@ void LLCurl::Responder::result(const LLSD& content) } // virtual -void LLCurl::Responder::completedRaw(U32 status, const std::string& reason, - const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer) +void LLCurl::Responder::completedRaw( + U32 status, + const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) { - if (isGoodStatus(status)) - { - LLSD content; - LLBufferStream istr(channels, buffer.get()); - LLSDSerialize::fromXML(content, istr); -/* - const S32 parseError = -1; - if(LLSDSerialize::fromXML(content, istr) == parseError) - { - mStatus = 498; - mReason = "Client Parse Error"; - } -*/ - completed(status, reason, content); - } - else if (status == 400) - { - // Get reason from buffer - char tbuf[4096]; - S32 len = 4096; - buffer->readAfter(channels.in(), NULL, (U8*)tbuf, len); - tbuf[len] = 0; - completed(status, std::string(tbuf), LLSD()); - } - else - { - completed(status, reason, LLSD()); - } + LLSD content; + LLBufferStream istr(channels, buffer.get()); + LLSDSerialize::fromXML(content, istr); + completed(status, reason, content); } // virtual @@ -167,10 +154,7 @@ void LLCurl::Responder::completed(U32 status, const std::string& reason, const L } else { - // *NOTE: This is kind of messed up. This should probably call - // the full error method which then provides a default impl - // which calls the thinner method. - error(status, reason); + error(status, reason, content); } } |