diff options
| author | Callum Prentice <callum@lindenlab.com> | 2014-02-27 16:27:58 -0800 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2014-02-27 16:27:58 -0800 |
| commit | 6e21b127d4224716f485e3fc8a195676f5708721 (patch) | |
| tree | 220d9738307a1c81fcd7eff2f68d675db43cb8f0 /indra/llcorehttp/httpcommon.cpp | |
| parent | d3abd1ca85028ba143dd715e91b145bf936875f1 (diff) | |
| parent | de8fea13627cc5978b8a6135802a52864a11c39a (diff) | |
merge with head
Diffstat (limited to 'indra/llcorehttp/httpcommon.cpp')
| -rwxr-xr-x | indra/llcorehttp/httpcommon.cpp | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp index 0738760763..c2f15155ac 100755 --- a/indra/llcorehttp/httpcommon.cpp +++ b/indra/llcorehttp/httpcommon.cpp @@ -70,7 +70,8 @@ std::string HttpStatus::toString() const "Invalid datatype for argument or option", "Option has not been explicitly set", "Option is not dynamic and must be set early", - "Invalid HTTP status code received from server" + "Invalid HTTP status code received from server", + "Could not allocate required resource" }; static const int llcore_errors_count(sizeof(llcore_errors) / sizeof(llcore_errors[0])); @@ -177,6 +178,44 @@ std::string HttpStatus::toString() const } +std::string HttpStatus::toTerseString() const +{ + std::ostringstream result; + + unsigned int error_value((unsigned short) mStatus); + + switch (mType) + { + case EXT_CURL_EASY: + result << "Easy_"; + break; + + case EXT_CURL_MULTI: + result << "Multi_"; + break; + + case LLCORE: + result << "Core_"; + break; + + default: + if (isHttpStatus()) + { + result << "Http_"; + error_value = mType; + } + else + { + result << "Unknown_"; + } + break; + } + + result << error_value; + return result.str(); +} + + // Pass true on statuses that might actually be cleared by a // retry. Library failures, calling problems, etc. aren't // going to be fixed by squirting bits all over the Net. @@ -206,6 +245,5 @@ bool HttpStatus::isRetryable() const *this == inv_cont_range); // Short data read disagrees with content-range } - } // end namespace LLCore |
