summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-01-09 15:18:54 -0500
committerMonty Brandenberg <monty@lindenlab.com>2014-01-09 15:18:54 -0500
commitb2fe32e5725e13930437ae8939d7213de69b35ca (patch)
treeadef030c300aa4026e4494e3433c44411a47c7d3 /indra/newview
parent7dec85a53dbbd2f0f3de7081c87762144e54ba70 (diff)
SH-4667 HTTP Viewer reports network error instead of a misnamed joint on mesh upload
Tried to add consistent mesh upload retries in the HTTP work but a combination of bad status choices in the upload service and the one-shot nature of the upload capabilities means that status information can be lost. For now, retain the wonderful manual retry logic. At some future point, we might fix the services or add application-level retry.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llmeshrepository.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 4296abb2cc..5afd2cb329 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
- * Copyright (C) 2010-2013, Linden Research, Inc.
+ * Copyright (C) 2010-2014, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -359,6 +359,16 @@ const U32 LARGE_MESH_FETCH_THRESHOLD = 1U << 21; // Size at which requests goes
const long SMALL_MESH_XFER_TIMEOUT = 120L; // Seconds to complete xfer, small mesh downloads
const long LARGE_MESH_XFER_TIMEOUT = 600L; // Seconds to complete xfer, large downloads
+// Would normally like to retry on uploads as some
+// retryable failures would be recoverable. Unfortunately,
+// the mesh service is using 500 (retryable) rather than
+// 400/bad request (permanent) for a bad payload and
+// retrying that just leads to revocation of the one-shot
+// cap which then produces a 404 on retry destroying some
+// (occasionally) useful error information. We'll leave
+// upload retries to the user as in the past. SH-4667.
+const long UPLOAD_RETRY_LIMIT = 0L;
+
// Maximum mesh version to support. Three least significant digits are reserved for the minor version,
// with major version changes indicating a format change that is not backwards compatible and should not
// be parsed by viewers that don't specifically support that version. For example, if the integer "1" is
@@ -1883,6 +1893,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mHttpOptions = new LLCore::HttpOptions;
mHttpOptions->setTransferTimeout(mMeshUploadTimeOut);
mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
+ mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT);
mHttpHeaders = new LLCore::HttpHeaders;
mHttpHeaders->append("Content-Type", "application/llsd+xml");
mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS);