summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 895629c514..ea0b99303e 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -144,6 +144,8 @@ HttpOpRequest::~HttpOpRequest()
mCurlHeaders = NULL;
}
+ mReplyOffset = 0;
+ mReplyLength = 0;
if (mReplyBody)
{
mReplyBody->release();
@@ -211,26 +213,11 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
response->setStatus(mStatus);
response->setBody(mReplyBody);
response->setHeaders(mReplyHeaders);
- unsigned int offset(0), length(0);
if (mReplyOffset || mReplyLength)
{
// Got an explicit offset/length in response
- offset = mReplyOffset;
- length = mReplyLength;
- }
- else if (mReplyBody && partial_content == mStatus)
- {
- // Legacy grid services did not provide a 'Content-Range'
- // header in responses to full- or partly-satisfyiable
- // 'Range' requests. For these, we have to hope that
- // the data starts where requested and the length is simply
- // whatever we received. A bit of sanity could be provided
- // by overlapping ranged requests and verifying that the
- // overlap matches.
- offset = mReqOffset;
- length = mReplyBody->size();
+ response->setRange(mReplyOffset, mReplyLength);
}
- response->setRange(offset, length);
mLibraryHandler->onCompleted(static_cast<HttpHandle>(this), response);