You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/07/26 19:13:49 UTC

[trafficserver] 02/02: Server information should be cleared when following redirect

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

sorber pushed a commit to branch 6.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

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

    Server information should be cleared when following redirect
    
    (cherry picked from commit e01f7ff372293da71724ced0815d02048c8b96dc)
    
    Conflicts:
    	proxy/http/HttpTransact.h
---
 proxy/http/HttpSM.cc      |  2 ++
 proxy/http/HttpTransact.h | 22 +++++++---------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 0f99a35..d8a398d 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7701,6 +7701,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 = NULL;
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index 204f3d7..5c37bdb 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -686,22 +686,14 @@ public:
       connect_result = e;
     }
 
-    ConnectionAttributes()
-      : http_version(),
-        keep_alive(HTTP_KEEPALIVE_UNDEFINED),
-        receive_chunked_response(false),
-        pipeline_possible(false),
-        proxy_connect_hdr(false),
-        connect_result(0),
-        name(NULL),
-        transfer_encoding(NO_TRANSFER_ENCODING),
-        state(STATE_UNDEFINED),
-        abort(ABORT_UNDEFINED),
-        port_attribute(HttpProxyPort::TRANSPORT_DEFAULT),
-        is_transparent(false)
+    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>.