summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpresponse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp/httpresponse.cpp')
-rwxr-xr-xindra/llcorehttp/httpresponse.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/indra/llcorehttp/httpresponse.cpp b/indra/llcorehttp/httpresponse.cpp
index c974395b0a..f5ad2ebd47 100755
--- a/indra/llcorehttp/httpresponse.cpp
+++ b/indra/llcorehttp/httpresponse.cpp
@@ -39,16 +39,17 @@ HttpResponse::HttpResponse()
mReplyLength(0U),
mReplyFullLength(0U),
mBufferArray(NULL),
- mHeaders(NULL),
+ mHeaders(),
mRetries(0U),
- m503Retries(0U)
+ m503Retries(0U),
+ mRequestUrl()
{}
HttpResponse::~HttpResponse()
{
setBody(NULL);
- setHeaders(NULL);
+ //setHeaders();
}
@@ -71,23 +72,14 @@ void HttpResponse::setBody(BufferArray * ba)
}
-void HttpResponse::setHeaders(HttpHeaders * headers)
+void HttpResponse::setHeaders(HttpHeaders::ptr_t &headers)
{
- if (mHeaders == headers)
- return;
-
- if (mHeaders)
- {
- mHeaders->release();
- }
-
- if (headers)
- {
- headers->addRef();
- }
-
- mHeaders = headers;
+ mHeaders = headers;
}
+size_t HttpResponse::getBodySize() const
+{
+ return (mBufferArray) ? mBufferArray->size() : 0;
+}
} // end namespace LLCore