Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions proxy/hdrs/HTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class HTTPHdr : public MIMEHdr
int valid() const;

void create(HTTPType polarity, HdrHeap *heap = NULL);
void clear();
void destroy();
void reset();
void copy(const HTTPHdr *hdr);
void copy_shallow(const HTTPHdr *hdr);
Expand Down Expand Up @@ -796,12 +796,13 @@ HTTPHdr::create(HTTPType polarity, HdrHeap *heap)
}

inline void
HTTPHdr::clear()
HTTPHdr::destroy()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing several other usages of HTTPHdr::clear() such as:

Http2UpgradeContext::~Http2UpgradeContext()
HttpTransactCache::calculate_quality_of_match()

And HTTPHdr::unmarshal()

Am I missing something?

{
if (m_http && m_http->m_polarity == HTTP_TYPE_REQUEST) {
m_url_cached.clear();
}
this->HdrHeapSDKHandle::clear();
// Removing the only pointers to this data therefore it needs to get cleaned up or leak.
this->HdrHeapSDKHandle::destroy();
m_http = NULL;
m_mime = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion proxy/http/HttpTransact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ HttpTransact::EndRemapRequest(State *s)
HTTP_INCREMENT_DYN_STAT(http_invalid_client_requests_stat);
TRANSACT_RETURN(SM_ACTION_SEND_ERROR_CACHE_NOOP, NULL);
} else {
s->hdr_info.client_response.clear(); // anything previously set is invalid from this point forward
s->hdr_info.client_response.destroy(); // anything previously set is invalid from this point forward
DebugTxn("http_trans", "END HttpTransact::EndRemapRequest");

if (s->is_upgrade_request && s->post_remap_upgrade_return_point) {
Expand Down