From d0d63c445db3d49a81dca6c8d392dacdc77851b1 Mon Sep 17 00:00:00 2001 From: vijayabhaskar Date: Wed, 31 May 2017 21:55:46 +0000 Subject: [PATCH 1/2] Server information should be cleared when following redirect...for 7.1.x branch --- proxy/http/HttpSM.cc | 2 ++ proxy/http/HttpTransact.h | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index b5f32691ce6..de96aa9622b 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7859,6 +7859,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 9049891443a..96fd9f5e855 100644 --- a/proxy/http/HttpTransact.h +++ b/proxy/http/HttpTransact.h @@ -702,8 +702,13 @@ class HttpTransact port_attribute(HttpProxyPort::TRANSPORT_DEFAULT), is_transparent(false) { - memset(&src_addr, 0, sizeof(src_addr)); - memset(&dst_addr, 0, sizeof(dst_addr)); + clear(); + } + void clear() + { + ink_zero(src_addr); + ink_zero(dst_addr); + connect_result = 0; } }; From b35a541b264da55673fc7326889371ea3fec0078 Mon Sep 17 00:00:00 2001 From: Vijay Mamidi Date: Wed, 31 May 2017 15:35:31 -0700 Subject: [PATCH 2/2] clang format --- proxy/http/HttpTransact.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h index 96fd9f5e855..33fa650fd50 100644 --- a/proxy/http/HttpTransact.h +++ b/proxy/http/HttpTransact.h @@ -702,13 +702,14 @@ class HttpTransact port_attribute(HttpProxyPort::TRANSPORT_DEFAULT), is_transparent(false) { - clear(); + clear(); } - void clear() + void + clear() { - ink_zero(src_addr); - ink_zero(dst_addr); - connect_result = 0; + ink_zero(src_addr); + ink_zero(dst_addr); + connect_result = 0; } };