summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
commitbb87365c37047a35bf524a98d5a48cdb2d56948e (patch)
tree5b44b30944f794c2e2f78a0990cf56f81d27fa78 /indra/llcorehttp/_httpoprequest.cpp
parenta89f3f29a0af37c7f3e78e38acb78f78e99dae78 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge viewer-release, become version 3.7.29
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rwxr-xr-xindra/llcorehttp/_httpoprequest.cpp30
1 files changed, 12 insertions, 18 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 7482a89dac..b9632a7921 100755
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -104,7 +104,6 @@ char * os_strltrim(char * str);
void os_strlower(char * str);
// Error testing and reporting for libcurl status codes
-void check_curl_easy_code(CURLcode code);
void check_curl_easy_code(CURLcode code, int curl_setopt_option);
static const char * const LOG_CORE("CoreHttp");
@@ -588,9 +587,18 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
(mReqLength ? fmt1 : fmt2),
(unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
#else
- snprintf(range_line, sizeof(range_line),
- (mReqLength ? fmt1 : fmt2),
- (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
+ if ( mReqLength )
+ {
+ snprintf(range_line, sizeof(range_line),
+ fmt1,
+ (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
+ }
+ else
+ {
+ snprintf(range_line, sizeof(range_line),
+ fmt2,
+ (unsigned long) mReqOffset);
+ }
#endif // LL_WINDOWS
range_line[sizeof(range_line) - 1] = '\0';
mCurlHeaders = curl_slist_append(mCurlHeaders, range_line);
@@ -1151,18 +1159,4 @@ void check_curl_easy_code(CURLcode code, int curl_setopt_option)
}
}
-
-void check_curl_easy_code(CURLcode code)
-{
- if (CURLE_OK != code)
- {
- // Comment from old llcurl code which may no longer apply:
- //
- // linux appears to throw a curl error once per session for a bad initialization
- // at a pretty random time (when enabling cookies).
- LL_WARNS(LOG_CORE) << "libcurl error detected: " << curl_easy_strerror(code)
- << LL_ENDL;
- }
-}
-
} // end anonymous namespace