diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-09-10 20:10:56 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-09-10 20:10:56 +0000 |
commit | 80dfa222fdc3747be9f5b64b9ace35907edf1c4e (patch) | |
tree | 6155c692ce1d625ea495c74cd68b1284712241f5 /indra/llmessage | |
parent | 0bd992b07cf17ac0e327cb95d6207883d88a60a3 (diff) |
Result of svn merge -r69150:69158 svn+ssh://svn/svn/linden/branches/named-queries-py3 into release.
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llhttpclient.cpp | 4 | ||||
-rw-r--r-- | indra/llmessage/llhttpclient.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 1763acaf8c..7158fb733d 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -54,7 +54,7 @@ void LLHTTPClient::Responder::completedRaw(U32 status, const std::string& reason LLBufferStream istr(channels, buffer.get()); LLSD content; - if (200 <= status && status < 300) + if (isGoodStatus(status)) { LLSDSerialize::fromXML(content, istr); /* @@ -73,7 +73,7 @@ void LLHTTPClient::Responder::completedRaw(U32 status, const std::string& reason // virtual void LLHTTPClient::Responder::completed(U32 status, const std::string& reason, const LLSD& content) { - if (200 <= status && status < 300) + if(isGoodStatus(status)) { result(content); } diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index e3074ee707..f3b2360058 100644 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h @@ -37,6 +37,14 @@ public: Responder(); virtual ~Responder(); + /** + * @brief return true if the status code indicates success. + */ + static bool isGoodStatus(U32 status) + { + return((200 <= status) && (status < 300)); + } + virtual void error(U32 status, const std::string& reason); // called with bad status codes virtual void result(const LLSD& content); |