You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2016/04/19 17:17:57 UTC
[trafficserver] branch master updated: TS-4046: Better fix for
cleaning up the client response for intercept plugins.
This is an automated email from the ASF dual-hosted git repository.
amc pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 608775e TS-4046: Better fix for cleaning up the client response for intercept plugins.
608775e is described below
commit 608775e1ceccba64f5dfd75957f4a24276fba755
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Tue Apr 19 10:17:22 2016 -0500
TS-4046: Better fix for cleaning up the client response for intercept plugins.
---
proxy/hdrs/HTTP.h | 7 +++----
proxy/http/HttpTransact.cc | 3 ++-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/proxy/hdrs/HTTP.h b/proxy/hdrs/HTTP.h
index 878fc83..b32d3ef 100644
--- a/proxy/hdrs/HTTP.h
+++ b/proxy/hdrs/HTTP.h
@@ -507,7 +507,7 @@ public:
int valid() const;
void create(HTTPType polarity, HdrHeap *heap = NULL);
- void destroy();
+ void clear();
void reset();
void copy(const HTTPHdr *hdr);
void copy_shallow(const HTTPHdr *hdr);
@@ -796,13 +796,12 @@ HTTPHdr::create(HTTPType polarity, HdrHeap *heap)
}
inline void
-HTTPHdr::destroy()
+HTTPHdr::clear()
{
if (m_http && m_http->m_polarity == HTTP_TYPE_REQUEST) {
m_url_cached.clear();
}
- // Removing the only pointers to this data therefore it needs to get cleaned up or leak.
- this->HdrHeapSDKHandle::destroy();
+ this->HdrHeapSDKHandle::clear();
m_http = NULL;
m_mime = NULL;
}
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index c3b345d..55db874 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -935,7 +935,8 @@ done:
HTTP_INCREMENT_DYN_STAT(http_invalid_client_requests_stat);
TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, NULL);
} else {
- s->hdr_info.client_response.destroy(); // anything previously set is invalid from this point forward
+ s->hdr_info.client_response.destroy(); // release the underlying memory.
+ s->hdr_info.client_response.clear(); // clear the pointers.
DebugTxn("http_trans", "END HttpTransact::EndRemapRequest");
if (s->is_upgrade_request && s->post_remap_upgrade_return_point) {
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].