summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpcommon.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-02-25 13:31:01 -0500
committerOz Linden <oz@lindenlab.com>2014-02-25 13:31:01 -0500
commit1d30fe955442855dd3102a006d6e4120d2f416b4 (patch)
tree1783c0818fb473e1bd8a5ed7a4622f45e30fc99d /indra/llcorehttp/httpcommon.cpp
parent9b42503379bc2e9698545543670306961f7db991 (diff)
parentde8fea13627cc5978b8a6135802a52864a11c39a (diff)
merge changes for 3.7.2-release
Diffstat (limited to 'indra/llcorehttp/httpcommon.cpp')
-rwxr-xr-xindra/llcorehttp/httpcommon.cpp42
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