diff options
Diffstat (limited to 'indra/llcorehttp')
-rwxr-xr-x | indra/llcorehttp/_httpoprequest.cpp | 30 | ||||
-rwxr-xr-x | indra/llcorehttp/bufferstream.cpp | 2 |
2 files changed, 12 insertions, 20 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index fbbb1614fb..a6df3ad5b2 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); @@ -1136,18 +1144,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 diff --git a/indra/llcorehttp/bufferstream.cpp b/indra/llcorehttp/bufferstream.cpp index 6553900eef..678bf5ea9f 100755 --- a/indra/llcorehttp/bufferstream.cpp +++ b/indra/llcorehttp/bufferstream.cpp @@ -257,8 +257,6 @@ std::streampos BufferArrayStreamBuf::seekoff(std::streamoff off, return ret; } - if (pos < 0) - return ret; if (pos > mBufferArray->size()) { pos = mBufferArray->size(); |