From 6c6d1c8338b15828278d27912bb9fe3b0d133b12 Mon Sep 17 00:00:00 2001 From: Monty Brandenberg Date: Tue, 5 Jun 2012 16:49:39 -0400 Subject: 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. --- indra/llcorehttp/_httpoprequest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') 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); -- cgit v1.2.3