From dc3f5ff87cfa085998bf69db6dedad45440419d3 Mon Sep 17 00:00:00 2001 From: Kyle Ambroff Date: Sat, 21 Jun 2008 07:39:52 +0000 Subject: 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 --- indra/llmessage/llcurl.cpp | 54 ++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 35 deletions(-) (limited to 'indra/llmessage/llcurl.cpp') 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 @@ -112,6 +112,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) { @@ -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); } } -- cgit v1.2.3