summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httppolicy.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-10-04 15:36:52 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-10-04 15:36:52 -0400
commit6f5790da38b3005292d3dbeaad778ea740110e33 (patch)
treeb28ce7a7a158f72f4dbfda60bafff2317c671837 /indra/llcorehttp/_httppolicy.cpp
parent56e2f11417183d8dcc3d681f79fc63446b236abb (diff)
parentf7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff)
Merge. Pull in viewer-release after 3.6.7 release.
Diffstat (limited to 'indra/llcorehttp/_httppolicy.cpp')
-rwxr-xr-xindra/llcorehttp/_httppolicy.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp
index edaf0a5307..fd5a93e192 100755
--- a/indra/llcorehttp/_httppolicy.cpp
+++ b/indra/llcorehttp/_httppolicy.cpp
@@ -388,33 +388,13 @@ bool HttpPolicy::cancel(HttpHandle handle)
bool HttpPolicy::stageAfterCompletion(HttpOpRequest * op)
{
- static const HttpStatus cant_connect(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_CONNECT);
- static const HttpStatus cant_res_proxy(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_RESOLVE_PROXY);
- static const HttpStatus cant_res_host(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_RESOLVE_HOST);
- static const HttpStatus send_error(HttpStatus::EXT_CURL_EASY, CURLE_SEND_ERROR);
- static const HttpStatus recv_error(HttpStatus::EXT_CURL_EASY, CURLE_RECV_ERROR);
- static const HttpStatus upload_failed(HttpStatus::EXT_CURL_EASY, CURLE_UPLOAD_FAILED);
- static const HttpStatus op_timedout(HttpStatus::EXT_CURL_EASY, CURLE_OPERATION_TIMEDOUT);
- static const HttpStatus post_error(HttpStatus::EXT_CURL_EASY, CURLE_HTTP_POST_ERROR);
-
// Retry or finalize
if (! op->mStatus)
{
- // If this failed, we might want to retry. Have to inspect
- // the status a little more deeply for those reasons worth retrying...
- if (op->mPolicyRetries < op->mPolicyRetryLimit &&
- ((op->mStatus.isHttpStatus() && op->mStatus.mType >= 499 && op->mStatus.mType <= 599) ||
- cant_connect == op->mStatus ||
- cant_res_proxy == op->mStatus ||
- cant_res_host == op->mStatus ||
- send_error == op->mStatus ||
- recv_error == op->mStatus ||
- upload_failed == op->mStatus ||
- op_timedout == op->mStatus ||
- post_error == op->mStatus))
+ // If this failed, we might want to retry.
+ if (op->mPolicyRetries < op->mPolicyRetryLimit && op->mStatus.isRetryable())
{
- // Okay, worth a retry. We include 499 in this test as
- // it's the old 'who knows?' error from many grid services...
+ // Okay, worth a retry.
retryOp(op);
return true; // still active/ready
}