trafficserver-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan M. Carroll (JIRA)" <j...@apache.org>
Subject [jira] Updated: (TS-438) HTTPS "remap" rules don't seem to work after TS-291
Date Thu, 16 Sep 2010 14:47:34 GMT

     [ https://issues.apache.org/jira/browse/TS-438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alan M. Carroll updated TS-438:
-------------------------------

    Comment: was deleted

(was: A patch that seems to work, ready for testing.

Index: proxy/http2/HttpTransact.cc
===================================================================
--- proxy/http2/HttpTransact.cc (revision 997761)
+++ proxy/http2/HttpTransact.cc (working copy)
@@ -1048,10 +1048,6 @@
   ////////////////////////////////////////////////
   URL *url = request->url_get();

-  hostname = request->host_get(&hostname_len);
-  if (!request->is_target_in_url())
-    s->hdr_info.client_req_is_server_style = true;
-
   s->orig_scheme = (scheme = url->scheme_get_wksidx());

   s->method = s->hdr_info.client_request.method_get_wksidx();
@@ -1068,6 +1064,15 @@
   if (s->method == HTTP_WKSIDX_CONNECT && !request->is_port_in_header())
     url->port_set(80);

+  // Ugly - this must come after the call to url->scheme_set or
+  // it can't get the scheme properly and the wrong data is cached.
+  // The solution should be to move the scheme detecting logic in to
+  // the header class, rather than doing it in a random bit of
+  // external code.
+  hostname = request->host_get(&hostname_len);
+  if (!request->is_target_in_url())
+    s->hdr_info.client_req_is_server_style = true;
+
   // If the incoming request is proxy-style AND contains a Host header,
   // then remove the Host header to prevent content spoofing.

Index: proxy/hdrs/HTTP.cc
===================================================================
--- proxy/hdrs/HTTP.cc  (revision 997761)
+++ proxy/hdrs/HTTP.cc  (working copy)
@@ -1491,7 +1491,7 @@
        m_port = m_port * 10 + *colon - '0';
       m_port_in_header = 0 != m_port;
     }
-    m_port = url_canonicalize_port(this->type_get(), m_port);
+    m_port = url_canonicalize_port(url->m_url_impl->m_url_type, m_port);
   } else {
     m_host_length = 0; // reset in case any earlier check corrupted it)

> HTTPS "remap" rules don't seem to work after TS-291
> ---------------------------------------------------
>
>                 Key: TS-438
>                 URL: https://issues.apache.org/jira/browse/TS-438
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>            Reporter: Leif Hedstrom
>            Priority: Blocker
>             Fix For: 2.1.3
>
>         Attachments: patch-438.txt
>
>
> It seems after the TS-291 merge to trunk, HTTPS remap rules no longer works. I've enabled
HTTPS support with
> CONFIG proxy.config.ssl.enabled INT 1
> CONFIG proxy.config.ssl.server.cert.filename STRING ts-test.pem
> and in remap.config
> map https://loki.ogre.com/ycs  http://l.yimg.com/a/lib/ycs
> A request like this ought to work, but gives a 404 (indicating no remap rule is matching);
> curl -D - -o /dev/null -s  -k https://loki.ogre.comycs/bench/500.bmp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message