From 06bebcc5c47795ba37136b013a53c9976f218fc0 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 19 Nov 2013 21:16:12 +0100 Subject: [PATCH] Bug fix for BlockingResponder. Blocking http requests (code using responders derived from BlockingResponder) *do* call getRaw() and getLLSD to get the body of server error messages. It is therefore perfectly ok if mStatus != HTTP_OK. --- indra/llmessage/llhttpclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 533469d93..1374a1b93 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -526,7 +526,7 @@ private: LLSD mResponse; protected: - /*virtual*/ LLSD const& getLLSD(void) const { llassert(mFinished && mCode == CURLE_OK && mStatus == HTTP_OK); return mResponse; } + /*virtual*/ LLSD const& getLLSD(void) const { llassert(mFinished && mCode == CURLE_OK); return mResponse; } /*virtual*/ void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer) { decode_llsd_body(status, reason, channels, buffer, mResponse); // This puts the body asString() in mResponse in case of http error. @@ -539,7 +539,7 @@ private: std::string mResponse; protected: - /*virtual*/ std::string const& getRaw(void) const { llassert(mFinished && mCode == CURLE_OK && mStatus == HTTP_OK); return mResponse; } + /*virtual*/ std::string const& getRaw(void) const { llassert(mFinished && mCode == CURLE_OK); return mResponse; } /*virtual*/ void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer) { decode_raw_body(mCode, reason, channels, buffer, mResponse);