summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-05 16:49:39 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-05 16:49:39 -0400
commit6c6d1c8338b15828278d27912bb9fe3b0d133b12 (patch)
tree2f45de08e7a6091aa707b1c6089d28fdfb9680c0
parent9a11a2946f4dec334ce1ac449b355ba16eaae23a (diff)
Format/data type mismatch lead to a 'Range: bytes=0-0' header which gave me 1 byte of data.
Shouldn't be making that kind of mistake.
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 196011f953..f52ff5a44c 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -376,19 +376,19 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
if ((mReqOffset || mReqLength) && HOR_GET == mReqMethod)
{
- static const char * fmt1("Range: bytes=%d-%d");
- static const char * fmt2("Range: bytes=%d-");
+ static const char * const fmt1("Range: bytes=%lu-%lu");
+ static const char * const fmt2("Range: bytes=%lu-");
char range_line[64];
#if defined(WIN32)
_snprintf_s(range_line, sizeof(range_line), sizeof(range_line) - 1,
(mReqLength ? fmt1 : fmt2),
- mReqOffset, mReqOffset + mReqLength - 1);
+ (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
#else
snprintf(range_line, sizeof(range_line),
(mReqLength ? fmt1 : fmt2),
- mReqOffset, mReqOffset + mReqLength - 1);
+ (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1));
#endif // defined(WIN32)
range_line[sizeof(range_line) - 1] = '\0';
mCurlHeaders = curl_slist_append(mCurlHeaders, range_line);