You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by vm...@apache.org on 2017/05/27 03:35:41 UTC

[trafficserver] branch master updated: Server information should be cleared when following redirect

This is an automated email from the ASF dual-hosted git repository.

vmamidi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  e01f7ff   Server information should be cleared when following redirect
e01f7ff is described below

commit e01f7ff372293da71724ced0815d02048c8b96dc
Author: Vijay Mamidi <vi...@yahoo.com>
AuthorDate: Thu May 25 12:01:26 2017 -0700

    Server information should be cleared when following redirect
---
 proxy/http/HttpSM.cc      |  2 ++
 proxy/http/HttpTransact.h | 10 +++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 52a0e49..aae2961 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7694,6 +7694,8 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
   // we have a new OS and need to have DNS lookup the new OS
   t_state.dns_info.lookup_success = false;
   t_state.force_dns               = false;
+  t_state.server_info.clear();
+  t_state.parent_info.clear();
 
   if (t_state.txn_conf->cache_http) {
     t_state.cache_info.object_read = nullptr;
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index f47fbcf..338bcd8 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -637,10 +637,14 @@ public:
       connect_result = e;
     }
 
-    ConnectionAttributes()
+    ConnectionAttributes() { clear(); }
+
+    void
+    clear()
     {
-      memset(&src_addr, 0, sizeof(src_addr));
-      memset(&dst_addr, 0, sizeof(dst_addr));
+      ink_zero(src_addr);
+      ink_zero(dst_addr);
+      connect_result = 0;
     }
   };
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].