diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2014-11-14 08:49:08 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2014-11-14 08:49:08 -0500 |
commit | 6be2f0ba2b672fc37cd6d4e8adf62ae71bf8c842 (patch) | |
tree | 86740538c9c2a2ff1359cf96db2521d99c8aebe7 /indra/llcorehttp | |
parent | 2301cf800f40101baed7a5936683d0b1e4968be1 (diff) | |
parent | 316e35ad2a735784cfc309ea9fd74d2d9d1f985a (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
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(); |