summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpresponse.cpp
diff options
context:
space:
mode:
authorrider <rider@lindenlab.com>2015-10-01 12:36:52 -0700
committerrider <rider@lindenlab.com>2015-10-01 12:36:52 -0700
commitca81b19e80d0e0301b08bad9bd32ada937dea10d (patch)
tree86e33382a19aa9b9f1555b8987a1a6b511b8cbe5 /indra/llcorehttp/httpresponse.cpp
parent17ff449ae6b2759f212daa4fd3de0a7ea2664866 (diff)
parent4334fd27e2215c1bfad3aa7ab7130b8c6b289de5 (diff)
Merge for Xcode 7
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