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/05/22 21:23:12 UTC
git commit: TS-2764 Remove when_to_add_no_cache_to_msie_requests
configuration
Repository: trafficserver
Updated Branches:
refs/heads/master e49d84773 -> 01aac1ef8
TS-2764 Remove when_to_add_no_cache_to_msie_requests configuration
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/01aac1ef
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/01aac1ef
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/01aac1ef
Branch: refs/heads/master
Commit: 01aac1ef83b8f3eed16d65ecae4c6ebf190ff3f5
Parents: e49d847
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed May 21 18:32:45 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu May 22 13:21:40 2014 -0600
----------------------------------------------------------------------
CHANGES | 2 +
.../configuration/records.config.en.rst | 8 +-
mgmt/RecordsConfig.cc | 9 --
proxy/http/HttpConfig.cc | 35 ------
proxy/http/HttpConfig.h | 11 --
proxy/http/HttpTransact.cc | 114 -------------------
proxy/http/HttpTransact.h | 1 -
7 files changed, 3 insertions(+), 177 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 9a9e8e8..2954e93 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 5.0.0
+ *) [TS-2764] Remove when_to_add_no_cache_to_msie_requests configuration.
+
*) [TS-2737] Rename rfc5861 plugin to stale_while_revalidate.
*) [TS-2400] Our default SSL cipher-suite advocates speed over security
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/doc/reference/configuration/records.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst
index 58d7baf..2777812 100644
--- a/doc/reference/configuration/records.config.en.rst
+++ b/doc/reference/configuration/records.config.en.rst
@@ -1155,13 +1155,7 @@ Cache Control
client's ``If-Modified-Since`` header for the proxy request.
.. ts:cv:: CONFIG proxy.config.http.cache.when_to_add_no_cache_to_msie_requests INT 0
- :reloadable:
-
- Specifies when to add ``no-cache`` directives to Microsoft Internet Explorer requests. You can specify the following:
-
- - ``0`` = ``no-cache`` is *not* added to MSIE requests
- - ``1`` = ``no-cache`` is added to IMS MSIE requests
- - ``2`` = ``no-cache`` is added to all MSIE requests
+ :deprecated:
.. ts:cv:: CONFIG proxy.config.http.cache.required_headers INT 0
:reloadable:
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index d605361..32b1848 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -643,15 +643,6 @@ RecordElement RecordsConfig[] = {
// #
{RECT_CONFIG, "proxy.config.http.cache.when_to_revalidate", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
- // # MSIE browsers currently don't send no-cache headers to
- // # reverse proxies or transparent caches, this variable controls
- // # when to add no-cache headers to MSIE requests:
- // #
- // # 0 - default; no-cache not added to MSIE requests
- // # 1 - no-cache added to IMS MSIE requests
- // # 2 - no-cache added to all MSIE requests
- {RECT_CONFIG, "proxy.config.http.cache.when_to_add_no_cache_to_msie_requests", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL, RECC_INT, NULL, RECA_NULL}
- ,
//
// # required headers: three options
// #
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/proxy/http/HttpConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 50feaf3..535a1be 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -500,38 +500,6 @@ register_stat_callbacks()
RECD_COUNTER, RECP_PERSISTENT, (int) http_throttled_proxy_only_stat, RecRawStatSyncCount);
RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i0_n0_m0",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i0_n0_m0_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i1_n0_m0",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i1_n0_m0_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i0_n1_m0",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i0_n1_m0_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i1_n1_m0",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i1_n1_m0_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i0_n0_m1",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i0_n0_m1_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i1_n0_m1",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i1_n0_m1_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i0_n1_m1",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i0_n1_m1_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
- "proxy.process.http.request_taxonomy.i1_n1_m1",
- RECD_COUNTER, RECP_PERSISTENT, (int) http_request_taxonomy_i1_n1_m1_stat, RecRawStatSyncCount);
-
- RecRegisterRawStat(http_rsb, RECT_PROCESS,
"proxy.process.http.icp_suggested_lookups",
RECD_COUNTER, RECP_PERSISTENT, (int) http_icp_suggested_lookups_stat, RecRawStatSyncCount);
@@ -1426,8 +1394,6 @@ HttpConfig::startup()
HttpEstablishStaticConfigByte(c.send_100_continue_response, "proxy.config.http.send_100_continue_response");
HttpEstablishStaticConfigByte(c.oride.cache_when_to_revalidate, "proxy.config.http.cache.when_to_revalidate");
- HttpEstablishStaticConfigByte(c.cache_when_to_add_no_cache_to_msie_requests,
- "proxy.config.http.cache.when_to_add_no_cache_to_msie_requests");
HttpEstablishStaticConfigByte(c.oride.cache_required_headers, "proxy.config.http.cache.required_headers");
HttpEstablishStaticConfigByte(c.oride.cache_range_lookup, "proxy.config.http.cache.range.lookup");
HttpEstablishStaticConfigByte(c.oride.cache_range_write, "proxy.config.http.cache.range.write");
@@ -1678,7 +1644,6 @@ HttpConfig::reconfigure()
params->send_100_continue_response = INT_TO_BOOL(m_master.send_100_continue_response);
params->oride.cache_when_to_revalidate = m_master.oride.cache_when_to_revalidate;
- params->cache_when_to_add_no_cache_to_msie_requests = m_master.cache_when_to_add_no_cache_to_msie_requests;
params->oride.cache_required_headers = m_master.oride.cache_required_headers;
params->oride.cache_range_lookup = INT_TO_BOOL(m_master.oride.cache_range_lookup);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index c4e92dd..15f4b79 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -149,15 +149,6 @@ enum
http_tunnels_stat,
http_throttled_proxy_only_stat,
- // HTTP requests classified by IMS/no-cache/MSIE
- http_request_taxonomy_i0_n0_m0_stat,
- http_request_taxonomy_i1_n0_m0_stat,
- http_request_taxonomy_i0_n1_m0_stat,
- http_request_taxonomy_i1_n1_m0_stat,
- http_request_taxonomy_i0_n0_m1_stat,
- http_request_taxonomy_i1_n0_m1_stat,
- http_request_taxonomy_i0_n1_m1_stat,
- http_request_taxonomy_i1_n1_m1_stat,
http_icp_suggested_lookups_stat,
// document size stats
@@ -719,7 +710,6 @@ public:
// cache control //
///////////////////
MgmtByte cache_enable_default_vary_headers;
- MgmtByte cache_when_to_add_no_cache_to_msie_requests;
////////////////////////////////////////////
// CONNECT ports (used to be == ssl_ports //
@@ -921,7 +911,6 @@ HttpConfigParams::HttpConfigParams()
cache_vary_default_other(NULL),
max_cache_open_write_retries(1),
cache_enable_default_vary_headers(0),
- cache_when_to_add_no_cache_to_msie_requests(-1),
connect_ports_string(NULL),
connect_ports(NULL),
push_method_enabled(0),
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index f6db127..0167136 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -1339,13 +1339,6 @@ HttpTransact::HandleRequest(State* s)
}
// this needs to be called after initializing state variables from request
- // it tries to handle the problem that MSIE only adds no-cache
- // headers to reload requests when there is an explicit proxy --- the
- // reload button does nothing in the case of transparent proxies.
- if (s->http_config_param->cache_when_to_add_no_cache_to_msie_requests >= 0)
- handle_msie_reload_badness(s, &s->hdr_info.client_request);
-
- // this needs to be called after initializing state variables from request
// it adds the client-ip to the incoming client request.
if (!s->cop_test_page)
@@ -5115,113 +5108,6 @@ HttpTransact::get_ka_info_from_host_db(State *s, ConnectionAttributes *server_in
return;
}
-//////////////////////////////////////////////////////////////////////////
-//
-// void HttpTransact::handle_msie_reload_badness(...)
-//
-// Microsoft Internet Explorer has a design flaw that is exposed with
-// transparent proxies. The reload button only generates no-cache
-// headers when there is an explicit proxy. When going to a reverse
-// proxy or when being transparently intercepted, no no-cache header is
-// added. This means state content cannot be reloaded with MSIE.
-//
-// This routine attempts to provide some knobs to improve the situation
-// by explicitly adding no-cache to requests in certain scenarios. In
-// the future we might want to adjust freshness lifetimes for MSIE
-// browsers. Hopefully Microsoft will fix this in future versions of
-// their browser, and then we can conditionally test version numbers.
-//
-// Here are the options available:
-// 0: never add no-cache headers to MSIE requests
-// 1: add no-cache headers to IMS MSIE requests
-// 2: add no-cache headers to all MSIE requests
-//
-//////////////////////////////////////////////////////////////////////////
-
-void
-HttpTransact::handle_msie_reload_badness(State* s, HTTPHdr* client_request)
-{
- int user_agent_value_len;
- int has_ua_msie, has_no_cache, has_ims;
- const char *user_agent_value, *c, *e;
-
- //////////////////////////////////////////////
- // figure out if User-Agent contains "MSIE" //
- //////////////////////////////////////////////
-
- has_ua_msie = 0;
- user_agent_value = client_request->value_get(MIME_FIELD_USER_AGENT, MIME_LEN_USER_AGENT, &user_agent_value_len);
- if (user_agent_value && user_agent_value_len >= 4) {
- c = user_agent_value;
- e = c + user_agent_value_len - 4;
- while (1) {
- c = (const char *) memchr(c, 'M', e - c);
- if (c == NULL)
- break;
- if ((c[1] == 'S') && (c[2] == 'I') && (c[3] == 'E')) {
- has_ua_msie = 1;
- break;
- }
- c++;
- }
- }
- ///////////////////////////////////////
- // figure out if no-cache and/or IMS //
- ///////////////////////////////////////
-
- has_no_cache = (client_request->is_pragma_no_cache_set() || (client_request->is_cache_control_set(HTTP_VALUE_NO_CACHE)));
- has_ims = (client_request->presence(MIME_PRESENCE_IF_MODIFIED_SINCE) != 0);
-
- /////////////////////////////////////////////////////////
- // increment some stats based on these three variables //
- /////////////////////////////////////////////////////////
-
- switch ((has_ims ? 4 : 0) + (has_no_cache ? 2 : 0) + (has_ua_msie ? 1 : 0)) {
- case 0:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i0_n0_m0_stat);
- break;
- case 1:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i0_n0_m1_stat);
- break;
- case 2:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i0_n1_m0_stat);
- break;
- case 3:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i0_n1_m1_stat);
- break;
- case 4:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i1_n0_m0_stat);
- break;
- case 5:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i1_n0_m1_stat);
- break;
- case 6:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i1_n1_m0_stat);
- break;
- case 7:
- HTTP_INCREMENT_TRANS_STAT(http_request_taxonomy_i1_n1_m1_stat);
- break;
- }
-
- //////////////////////////////////////////////////////////////////
- // if MSIE no-cache addition is disabled, or this isn't an //
- // MSIE browser, or if no-cache is already set, get outta here //
- //////////////////////////////////////////////////////////////////
-
- if ((s->http_config_param->cache_when_to_add_no_cache_to_msie_requests == 0) || (!has_ua_msie) || has_no_cache) {
- return;
- }
- //////////////////////////////////////////////////////
- // add a no-cache if mode and circumstances warrant //
- //////////////////////////////////////////////////////
-
- if ((s->http_config_param->cache_when_to_add_no_cache_to_msie_requests == 2) ||
- ((s->http_config_param->cache_when_to_add_no_cache_to_msie_requests == 1) && has_ims)) {
- client_request->value_append(MIME_FIELD_PRAGMA, MIME_LEN_PRAGMA, "no-cache", 8, true);
- }
-}
-
-
void
HttpTransact::add_client_ip_to_outgoing_request(State* s, HTTPHdr* request)
{
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/01aac1ef/proxy/http/HttpTransact.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index fdbd9a6..74754d1 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -1299,7 +1299,6 @@ public:
HostDBInfo* host_db_info);
static bool service_transaction_in_proxy_only_mode(State* s);
static void setup_plugin_request_intercept(State* s);
- static void handle_msie_reload_badness(State* s, HTTPHdr* client_request);
static void add_client_ip_to_outgoing_request(State* s, HTTPHdr* request);
static RequestError_t check_request_validity(State* s, HTTPHdr* incoming_hdr);
static ResponseError_t check_response_validity(State* s, HTTPHdr* incoming_hdr);