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/11/08 14:33:37 UTC
[trafficserver] branch master updated: Remove unneeded malloc from
url_rewrite debug path for HOST header.
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 9d11d6f Remove unneeded malloc from url_rewrite debug path for HOST header.
9d11d6f is described below
commit 9d11d6f2bfc211a6b9721e50570f49487fe16171
Author: Alan M. Carroll <so...@yahoo-inc.com>
AuthorDate: Mon Nov 7 15:27:12 2016 -0600
Remove unneeded malloc from url_rewrite debug path for HOST header.
---
proxy/http/remap/RemapProcessor.cc | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/proxy/http/remap/RemapProcessor.cc b/proxy/http/remap/RemapProcessor.cc
index f557c52..fd9426e 100644
--- a/proxy/http/remap/RemapProcessor.cc
+++ b/proxy/http/remap/RemapProcessor.cc
@@ -240,18 +240,11 @@ RemapProcessor::finish_remap(HttpTransact::State *s)
const char *host_hdr = request_header->value_get(MIME_FIELD_HOST, MIME_LEN_HOST, &host_len);
if (request_url && host_hdr != nullptr && s->txn_conf->maintain_pristine_host_hdr == 0) {
- // Debug code to print out old host header. This was easier before
- // the header conversion. Now we have to copy to gain null
- // termination for the Debug() call
if (is_debug_tag_set("url_rewrite")) {
int old_host_hdr_len;
char *old_host_hdr = (char *)request_header->value_get(MIME_FIELD_HOST, MIME_LEN_HOST, &old_host_hdr_len);
-
- if (old_host_hdr) {
- old_host_hdr = ats_strndup(old_host_hdr, old_host_hdr_len);
+ if (old_host_hdr)
Debug("url_rewrite", "Host: Header before rewrite %.*s", old_host_hdr_len, old_host_hdr);
- ats_free(old_host_hdr);
- }
}
//
// Create the new host header field being careful that our
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].