trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1154744 - in /trafficserver/traffic/trunk/proxy: InkAPI.cc InkAPITest.cc api/ts/ts.h.in http/HttpConfig.cc http/HttpConfig.h http/HttpTransact.cc
Date Sun, 07 Aug 2011 18:24:04 GMT
Author: zwoop
Date: Sun Aug  7 18:24:03 2011
New Revision: 1154744

URL: http://svn.apache.org/viewvc?rev=1154744&view=rev
Log:
TS-906 ATS does not read proxy.config.http.forward.proxy_auth_to_parent

Modified:
    trafficserver/traffic/trunk/proxy/InkAPI.cc
    trafficserver/traffic/trunk/proxy/InkAPITest.cc
    trafficserver/traffic/trunk/proxy/api/ts/ts.h.in
    trafficserver/traffic/trunk/proxy/http/HttpConfig.cc
    trafficserver/traffic/trunk/proxy/http/HttpConfig.h
    trafficserver/traffic/trunk/proxy/http/HttpTransact.cc

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1154744&r1=1154743&r2=1154744&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Sun Aug  7 18:24:03 2011
@@ -7263,6 +7263,9 @@ _conf_to_memberp(TSOverridableConfigKey 
   case TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT:
     ret = &sm->t_state.txn_conf->sock_option_flag_out;
     break;
+  case TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT:
+    ret = &sm->t_state.txn_conf->fwd_proxy_auth_to_parent;
+    break;
   case TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM:
     ret = &sm->t_state.txn_conf->anonymize_remove_from;
     break;
@@ -7766,6 +7769,10 @@ TSHttpTxnConfigFind(const char* name, in
       if (!strncmp(name, "proxy.config.http.connect_attempts_max_retries", length))
         cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES;
       break;
+    case 't':
+      if (!strncmp(name, "proxy.config.http.forward.proxy_auth_to_parent", length))
+        cnf = TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT;
+      break;
     }
     break;
 

Modified: trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=1154744&r1=1154743&r2=1154744&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITest.cc Sun Aug  7 18:24:03 2011
@@ -7510,6 +7510,7 @@ const char *SDK_Overridable_Configs[] = 
   "proxy.config.net.sock_recv_buffer_size_out",
   "proxy.config.net.sock_send_buffer_size_out",
   "proxy.config.net.sock_option_flag_out",
+  "proxy.config.http.forward.proxy_auth_to_parent",
   "proxy.config.http.anonymize_remove_from",
   "proxy.config.http.anonymize_remove_referer",
   "proxy.config.http.anonymize_remove_user_agent",

Modified: trafficserver/traffic/trunk/proxy/api/ts/ts.h.in
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/api/ts/ts.h.in?rev=1154744&r1=1154743&r2=1154744&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/api/ts/ts.h.in (original)
+++ trafficserver/traffic/trunk/proxy/api/ts/ts.h.in Sun Aug  7 18:24:03 2011
@@ -497,6 +497,7 @@ extern "C"
     TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT,
     TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT,
     TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT,
+    TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT,
     TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM,
     TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER,
     TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT,

Modified: trafficserver/traffic/trunk/proxy/http/HttpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpConfig.cc?rev=1154744&r1=1154743&r2=1154744&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpConfig.cc Sun Aug  7 18:24:03 2011
@@ -1218,7 +1218,7 @@ HttpConfig::startup()
   HttpEstablishStaticConfigLongLong(c.oride.sock_send_buffer_size_out, "proxy.config.net.sock_send_buffer_size_out");
   HttpEstablishStaticConfigLongLong(c.oride.sock_option_flag_out, "proxy.config.net.sock_option_flag_out");
 
-  c.fwd_proxy_auth_to_parent = 0;
+  HttpEstablishStaticConfigByte(c.oride.fwd_proxy_auth_to_parent, "proxy.config.http.forward.proxy_auth_to_parent");
 
   HttpEstablishStaticConfigByte(c.oride.anonymize_remove_from, "proxy.config.http.anonymize_remove_from");
   HttpEstablishStaticConfigByte(c.oride.anonymize_remove_referer, "proxy.config.http.anonymize_remove_referer");
@@ -1436,7 +1436,6 @@ HttpConfig::reconfigure()
   }
 
   params->parent_proxy_routing_enable = INT_TO_BOOL(m_master.parent_proxy_routing_enable);
-  params->fwd_proxy_auth_to_parent = 0;
   params->enable_url_expandomatic = INT_TO_BOOL(m_master.enable_url_expandomatic);
 
   params->oride.insert_request_via_string = INT_TO_BOOL(m_master.oride.insert_request_via_string);
@@ -1487,6 +1486,8 @@ HttpConfig::reconfigure()
   params->oride.sock_send_buffer_size_out = m_master.oride.sock_send_buffer_size_out;
   params->oride.sock_option_flag_out = m_master.oride.sock_option_flag_out;
 
+  params->oride.fwd_proxy_auth_to_parent = INT_TO_BOOL(m_master.oride.fwd_proxy_auth_to_parent);
+
   params->oride.anonymize_remove_from = INT_TO_BOOL(m_master.oride.anonymize_remove_from);
   params->oride.anonymize_remove_referer = INT_TO_BOOL(m_master.oride.anonymize_remove_referer);
   params->oride.anonymize_remove_user_agent = INT_TO_BOOL(m_master.oride.anonymize_remove_user_agent);

Modified: trafficserver/traffic/trunk/proxy/http/HttpConfig.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpConfig.h?rev=1154744&r1=1154743&r2=1154744&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpConfig.h (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpConfig.h Sun Aug  7 18:24:03 2011
@@ -403,9 +403,11 @@ struct OverridableHttpConfigParams {
        negative_caching_enabled(0), negative_caching_lifetime(0), cache_when_to_revalidate(0),
        keep_alive_enabled_in(0), keep_alive_enabled_out(0), keep_alive_post_out(0),
        sock_recv_buffer_size_out(0), sock_send_buffer_size_out(0), sock_option_flag_out(0),
+       fwd_proxy_auth_to_parent(0),
        anonymize_remove_from(0), anonymize_remove_referer(0), anonymize_remove_user_agent(0),
        anonymize_remove_cookie(0), anonymize_remove_client_ip(0), anonymize_insert_client_ip(1),
        append_xforwards_header(0), proxy_response_server_enabled(0),
+
        insert_squid_x_forwarded_for(0), send_http11_requests(3), // SEND_HTTP11_IF_REQUEST_11_AND_HOSTDB
        cache_http(0), cache_ignore_client_no_cache(0), cache_ignore_client_cc_max_age(1),
        cache_ims_on_client_no_cache(0), cache_ignore_server_no_cache(0), cache_responses_to_cookies(0),
@@ -458,6 +460,8 @@ struct OverridableHttpConfigParams {
   MgmtInt sock_send_buffer_size_out;
   MgmtInt sock_option_flag_out;
 
+  MgmtByte fwd_proxy_auth_to_parent;
+
   ///////////////////////////////////////////////////////////////////
   // Privacy: fields which are removed from the user agent request //
   ///////////////////////////////////////////////////////////////////
@@ -764,12 +768,6 @@ public:
   MgmtInt default_buffer_water_mark;
   MgmtByte enable_http_info;
 
-  //////////////////////
-  //  Breaking Specs  //
-  //  mostly for BofA //
-  //////////////////////
-  MgmtInt fwd_proxy_auth_to_parent;
-
   // Cluster time delta is not a config variable,
   //  rather it is the time skew which the manager observes
   int32_t cluster_time_delta;
@@ -967,7 +965,6 @@ HttpConfigParams::HttpConfigParams()
     default_buffer_size_index(0),
     default_buffer_water_mark(0),
     enable_http_info(0),
-    fwd_proxy_auth_to_parent(0),
     cluster_time_delta(0),
     srv_enabled(0),
     redirection_enabled(1),

Modified: trafficserver/traffic/trunk/proxy/http/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpTransact.cc?rev=1154744&r1=1154743&r2=1154744&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpTransact.cc Sun Aug  7 18:24:03 2011
@@ -3984,7 +3984,7 @@ HttpTransact::handle_100_continue_respon
 void
 HttpTransact::build_response_copy(State* s, HTTPHdr* base_response,HTTPHdr* outgoing_response,
HTTPVersion outgoing_version)
 {
-  HttpTransactHeaders::copy_header_fields(base_response, outgoing_response, s->http_config_param->fwd_proxy_auth_to_parent,
+  HttpTransactHeaders::copy_header_fields(base_response, outgoing_response, s->txn_conf->fwd_proxy_auth_to_parent,
                                           s->current.now);
   HttpTransactHeaders::convert_response(outgoing_version, outgoing_response);   // http version
conversion
   HttpTransactHeaders::add_server_header_to_response(s->txn_conf, outgoing_response);
@@ -7773,7 +7773,7 @@ HttpTransact::build_request(State* s, HT
     }
   }
 
-  HttpTransactHeaders::copy_header_fields(base_request, outgoing_request, s->http_config_param->fwd_proxy_auth_to_parent);
+  HttpTransactHeaders::copy_header_fields(base_request, outgoing_request, s->txn_conf->fwd_proxy_auth_to_parent);
   add_client_ip_to_outgoing_request(s, outgoing_request);
   HttpTransactHeaders::process_connection_headers(base_request, outgoing_request);
   HttpTransactHeaders::remove_privacy_headers_from_request(s->http_config_param, s->txn_conf,
outgoing_request);
@@ -7886,7 +7886,7 @@ HttpTransact::build_response(State* s, H
     HttpTransactHeaders::build_base_response(outgoing_response, status_code, reason_phrase,
strlen(reason_phrase), s->current.now);
   } else {
     if ((status_code == HTTP_STATUS_NONE) || (status_code == base_response->status_get()))
{
-      HttpTransactHeaders::copy_header_fields(base_response, outgoing_response, s->http_config_param->fwd_proxy_auth_to_parent);
+      HttpTransactHeaders::copy_header_fields(base_response, outgoing_response, s->txn_conf->fwd_proxy_auth_to_parent);
       HttpTransactHeaders::process_connection_headers(base_response, outgoing_response);
 
       if (s->http_config_param->insert_age_in_response)



Mime
View raw message