You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2011/01/06 18:40:45 UTC

svn commit: r1055954 - in /trafficserver/traffic/trunk/proxy/http2: HttpConfig.cc HttpConfig.h HttpTransact.cc

Author: amc
Date: Thu Jan  6 17:40:44 2011
New Revision: 1055954

URL: http://svn.apache.org/viewvc?rev=1055954&view=rev
Log:
TS-613 after re-open

Modified:
    trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
    trafficserver/traffic/trunk/proxy/http2/HttpConfig.h
    trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc

Modified: trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc?rev=1055954&r1=1055953&r2=1055954&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConfig.cc Thu Jan  6 17:40:44 2011
@@ -1331,10 +1331,6 @@ HttpConfig::startup()
 
   HttpEstablishStaticConfigLongLong(c.oride.send_http11_requests, "proxy.config.http.send_http11_requests");
 
-  if (!c.transparency_enabled) {
-    //By this time, we would have read Socks configuration.
-    c.transparency_enabled = netProcessor.socks_conf_stuff->accept_enabled;
-  }
   // HTTP Referer Filtering
   HttpEstablishStaticConfigLongLong(c.referer_filter_enabled, "proxy.config.http.referer_filter");
   HttpEstablishStaticConfigLongLong(c.referer_format_redirect, "proxy.config.http.referer_format_redirect");
@@ -1631,8 +1627,6 @@ HttpConfig::reconfigure()
 
   params->quick_filter_mask = m_master.quick_filter_mask;
 
-  params->transparency_enabled = m_master.transparency_enabled;
-
   params->oride.down_server_timeout = m_master.oride.down_server_timeout;
   params->oride.client_abort_threshold = m_master.oride.client_abort_threshold;
 

Modified: trafficserver/traffic/trunk/proxy/http2/HttpConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpConfig.h?rev=1055954&r1=1055953&r2=1055954&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpConfig.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpConfig.h Thu Jan  6 17:40:44 2011
@@ -722,7 +722,6 @@ public:
   //////////////////
   // Transparency //
   //////////////////
-  MgmtInt transparency_enabled; ///< @b OBSOLETE
   /// Accept connections on foreign addresses.
   bool client_transparency_enabled;
   /// Use client address to connect to origin server.
@@ -981,7 +980,8 @@ HttpConfigParams::HttpConfigParams()
     referer_format_redirect(0),
     accept_encoding_filter_enabled(0),
     quick_filter_mask(0),
-    transparency_enabled(0),
+    client_transparency_enabled(0),
+    server_transparency_enabled(0),
     negative_revalidating_enabled(0),
     negative_revalidating_lifetime(0),
     record_cop_page(0),

Modified: trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc?rev=1055954&r1=1055953&r2=1055954&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/HttpTransact.cc Thu Jan  6 17:40:44 2011
@@ -6411,15 +6411,23 @@ HttpTransact::is_request_valid(State* s,
 
     Debug("http_trans", "[is_request_valid] missing host field");
     SET_VIA_STRING(VIA_DETAIL_TUNNEL, VIA_DETAIL_TUNNEL_NO_FORWARD);
-    if (s->http_config_param->transparency_enabled) {   // host header missing, and transparency on
-      build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Host Header Required", "interception#no_host",
-                           // This is all one long string
-                           "An attempt was made to transparently proxy your request, "
-                           "but this attempt failed because your browser did not "
-                           "send an HTTP 'Host' header.<p>Please manually configure "
-                           "your browser to use 'http://%s:%d' as an HTTP proxy. "
-                           "Please refer to your browser's documentation for details. ",
-                           s->http_config_param->proxy_hostname, s->http_config_param->proxy_server_port);
+    // Transparent client side, but client did not provide any HOST information
+    // (neither in the URL nor a HOST header).
+    if (s->http_config_param->client_transparency_enabled) {
+      build_error_response(
+        s,
+        HTTP_STATUS_BAD_REQUEST,
+        "Host Header Required",
+        "interception#no_host",
+        // This is all one long string
+        "An attempt was made to transparently proxy your request, "
+        "but this attempt failed because your browser did not "
+        "send an HTTP 'Host' header.<p>Please manually configure "
+        "your browser to use 'http://%s:%d' as an HTTP proxy. "
+        "Please refer to your browser's documentation for details. ",
+        s->http_config_param->proxy_hostname,
+        s->http_config_param->proxy_server_port
+      );
     } else if (s->http_config_param->reverse_proxy_enabled) {   // host header missing, and transparency off but reverse
       // proxy on
       build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Host Header Required", "request#no_host",