summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-03-16 09:49:57 -0700
committerMerov Linden <merov@lindenlab.com>2015-03-16 09:49:57 -0700
commit9ba10bf1f2ee16eb082f4cb29b0b9f7172e7ce8e (patch)
tree9548ff32e0a1dc5b3f8a70b2a386827f72bf5284 /indra/llcorehttp/_httpoprequest.cpp
parent184bf6a76fd3b52efa83c93f56164d2adce7ed3e (diff)
parentd4a2e9fd9a0e7001a6c824ddd6cf37039a632b9d (diff)
Merge lindenlab/viewer-tools-update
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