You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/01/27 21:41:48 UTC

[18/28] git commit: TS-2481 Incorrect origin server port used sometimes (with keep-alive).

TS-2481 Incorrect origin server port used sometimes (with keep-alive).


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/12b2882d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/12b2882d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/12b2882d

Branch: refs/heads/5.0.x
Commit: 12b2882da8dd17001eef1e706610987db794c70b
Parents: 5b16367
Author: Dimitry Andric <di...@andric.com>
Authored: Fri Jan 24 11:22:36 2014 +0100
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Jan 24 11:22:36 2014 +0100

----------------------------------------------------------------------
 CHANGES              | 3 +++
 proxy/http/HttpSM.cc | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/12b2882d/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index a24e138..7d24d27 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.2.0
 
+  *) [TS-2481] Incorrect origin server port used sometimes (with keep-alive).
+   Author: Dimitry Andric <di...@andric.com>
+
   *) [TS-2526] Remove the g_stats_snap_fpath global variable.
 
   *) [TS-2525] Remove restrictions on outbound transparency with SSL.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/12b2882d/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 5b1b855..41f8cf1 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4536,8 +4536,8 @@ HttpSM::do_http_server_open(bool raw)
     HttpServerSession *existing_ss = ua_session->get_server_session();
 
     if (existing_ss) {
-      // [amc] Is this OK? Should we compare ports? (not done by ats_ip_addr_cmp)
-      if (ats_ip_addr_eq(&existing_ss->server_ip.sa, &t_state.current.server->addr.sa)) {
+      if (ats_ip_addr_eq(&existing_ss->server_ip.sa, &t_state.current.server->addr.sa) &&
+          ats_ip_port_cast(&existing_ss->server_ip) == ats_ip_port_cast(&t_state.current.server->addr)) {
         ua_session->attach_server_session(NULL);
         existing_ss->state = HSS_ACTIVE;
         this->attach_server_session(existing_ss);