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/04/05 04:19:04 UTC

[1/2] git commit: TS-2656 Determine server connection scheme immediately before connecting

Repository: trafficserver
Updated Branches:
  refs/heads/master 24fda51b1 -> b72ecb1a9


TS-2656 Determine server connection scheme immediately before connecting


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

Branch: refs/heads/master
Commit: 23d1622ed200b8db6b9ef4f7649f6a701eb6b2c4
Parents: 24fda51
Author: Ron Barber <rw...@gmail.com>
Authored: Fri Apr 4 20:17:10 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Apr 4 20:17:10 2014 -0600

----------------------------------------------------------------------
 proxy/http/HttpSM.cc | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/23d1622e/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index e60f5a4..7e6fd13 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4603,7 +4603,20 @@ HttpSM::do_http_server_open(bool raw)
     }
   }
 
-  if (t_state.scheme == URL_WKSIDX_HTTPS) {
+  int scheme_to_use = t_state.scheme; // get initial scheme
+
+  if (!t_state.is_websocket) { // if not websocket, then get scheme from server request
+    int new_scheme_to_use = t_state.hdr_info.server_request.url_get()->scheme_get_wksidx();
+    // if the server_request url scheme was never set, try the client_request
+    if (new_scheme_to_use < 0) {
+      new_scheme_to_use = t_state.hdr_info.client_request.url_get()->scheme_get_wksidx();
+    }
+    if (new_scheme_to_use >= 0) { // found a new scheme, use it
+      scheme_to_use = new_scheme_to_use;
+    }
+  }
+
+  if (scheme_to_use == URL_WKSIDX_HTTPS) {
     DebugSM("http", "calling sslNetProcessor.connect_re");
     connect_action_handle = sslNetProcessor.connect_re(this,    // state machine
                                                        &t_state.current.server->addr.sa,    // addr + port


[2/2] git commit: Add TS-2656 to CHANGE, and minor indentation fixes.

Posted by zw...@apache.org.
Add TS-2656 to CHANGE, and minor indentation fixes.


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

Branch: refs/heads/master
Commit: b72ecb1a9025e6285ba19f750e168343268c8842
Parents: 23d1622
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Apr 4 20:18:53 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Apr 4 20:18:53 2014 -0600

----------------------------------------------------------------------
 CHANGES | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b72ecb1a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index e9bb123..4a02168 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,14 +1,17 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2656 Determine server connection scheme immediately before
+   connecting. Author: Ron Barber <rw...@gmail.com>
+
   *) [TS-2578] Close the client connection when you close TransformTerminus.
    Author: Jack Bates <ja...@nottheoilrig.com>
 
   *) [TS-2657] Eliminate TSHttpTxnSetHttpRetBody() and improve upon
    TSHttpTxnErrorBodySet(). This also reduces the size of the HttpSM by 25%.
 
-  *) [TS-2589] Don't hold up the response until the server starts sending content.
-   Author: Jack Bates <ja...@nottheoilrig.com>
+  *) [TS-2589] Don't hold up the response until the server starts sending
+   content. Author: Jack Bates <ja...@nottheoilrig.com>
 
   *) [TS-2687] Support for MIPS paltform.
    Author: Dejan Latinovic <De...@rt-rk.com> 
@@ -27,9 +30,10 @@ Changes with Apache Traffic Server 5.0.0
 
   *) [TS-2674] Remove debug printf() from traffic_top.
 
-  *) [TS-2652] atscppapi: Providing a cancel() in asyncproviders 
+  *) [TS-2652] atscppapi: Providing a cancel() in asyncproviders .
   
-  *) [TS-2667] atscppapi: Allow intercept plugins to access request headers object
+  *) [TS-2667] atscppapi: Allow intercept plugins to access request headers
+   object.
 
   *) [TS-2672] TSMimeHdrFieldDestroy should not assert on removed fields.