TS-3232: remove obsolete proxy.config.cache.vary_on_user_agent configuration
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/13053ee3 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/13053ee3 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/13053ee3 Branch: refs/heads/master Commit: 13053ee3b4ed2fc63eb32cbd5472a394246f0546 Parents: bce3e2d Author: James Peach <[email protected]> Authored: Tue Dec 2 13:35:00 2014 -0800 Committer: James Peach <[email protected]> Committed: Tue Dec 9 14:10:54 2014 -0800 ---------------------------------------------------------------------- .../ja/LC_MESSAGES/reference/configuration/records.config.en.po | 4 +--- doc/reference/configuration/records.config.en.rst | 4 +--- iocore/cache/Cache.cc | 4 ---- iocore/cache/P_CacheInternal.h | 1 - lib/perl/lib/Apache/TS/AdminClient.pm | 1 - mgmt/RecordsConfig.cc | 4 ---- proxy/http/HttpTransact.cc | 1 - proxy/http/HttpTransactCache.cc | 5 ++--- 8 files changed, 4 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po ---------------------------------------------------------------------- diff --git a/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po b/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po index 59115c9..cfb8fe1 100644 --- a/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po +++ b/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po @@ -3197,9 +3197,7 @@ msgstr "" #: ../../reference/configuration/records.config.en.rst:1199 msgid "" "The maximum number of alternates that are allowed for any given URL. " -"Disable by setting to 0. Note that this setting will not strictly enforce " -"this if the variable ``proxy.config.cache.vary_on_user_agent`` is set to 1 " -"(by default it is 0)." +"Disable by setting to 0." msgstr "" #: ../../reference/configuration/records.config.en.rst:1206 http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/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 cbb6db6..c8c445a 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -1316,9 +1316,7 @@ Cache Control .. ts:cv:: CONFIG proxy.config.cache.limits.http.max_alts INT 5 The maximum number of alternates that are allowed for any given URL. - Disable by setting to 0. Note that this setting will not strictly enforce - this if the variable ``proxy.config.cache.vary_on_user_agent`` is set - to 1 (by default it is 0). + Disable by setting to 0. .. ts:cv:: CONFIG proxy.config.cache.target_fragment_size INT 1048576 http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/iocore/cache/Cache.cc ---------------------------------------------------------------------- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc index 9aece93..5f0edec 100644 --- a/iocore/cache/Cache.cc +++ b/iocore/cache/Cache.cc @@ -64,7 +64,6 @@ int cache_config_ram_cache_use_seen_filter = 0; int cache_config_http_max_alts = 3; int cache_config_dir_sync_frequency = 60; int cache_config_permit_pinning = 0; -int cache_config_vary_on_user_agent = 0; int cache_config_select_alternate = 1; int cache_config_max_doc_size = 0; int cache_config_min_average_object_size = ESTIMATED_OBJECT_SIZE; @@ -3509,9 +3508,6 @@ ink_cache_init(ModuleVersion v) REC_EstablishStaticConfigInt32(cache_config_dir_sync_frequency, "proxy.config.cache.dir.sync_frequency"); Debug("cache_init", "proxy.config.cache.dir.sync_frequency = %d", cache_config_dir_sync_frequency); - REC_EstablishStaticConfigInt32(cache_config_vary_on_user_agent, "proxy.config.cache.vary_on_user_agent"); - Debug("cache_init", "proxy.config.cache.vary_on_user_agent = %d", cache_config_vary_on_user_agent); - REC_EstablishStaticConfigInt32(cache_config_select_alternate, "proxy.config.cache.select_alternate"); Debug("cache_init", "proxy.config.cache.select_alternate = %d", cache_config_select_alternate); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/iocore/cache/P_CacheInternal.h ---------------------------------------------------------------------- diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h index 57c5b0b..dd36dd4 100644 --- a/iocore/cache/P_CacheInternal.h +++ b/iocore/cache/P_CacheInternal.h @@ -212,7 +212,6 @@ extern int cache_config_dir_sync_frequency; extern int cache_config_http_max_alts; extern int cache_config_permit_pinning; extern int cache_config_select_alternate; -extern int cache_config_vary_on_user_agent; extern int cache_config_max_doc_size; extern int cache_config_min_average_object_size; extern int cache_config_agg_write_backlog; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/lib/perl/lib/Apache/TS/AdminClient.pm ---------------------------------------------------------------------- diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm index 676ad74..3354e96 100644 --- a/lib/perl/lib/Apache/TS/AdminClient.pm +++ b/lib/perl/lib/Apache/TS/AdminClient.pm @@ -344,7 +344,6 @@ The Apache Traffic Server Administration Manual will explain what these strings proxy.config.cache.storage_filename proxy.config.cache.threads_per_disk proxy.config.cache.url_hash_method - proxy.config.cache.vary_on_user_agent proxy.config.cache.mutex_retry_delay proxy.config.cluster.cluster_configuration proxy.config.cluster.cluster_load_clear_duration http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/mgmt/RecordsConfig.cc ---------------------------------------------------------------------- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index d48bfcc..bb8f738 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -888,8 +888,6 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.cache.permit.pinning", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_INT, "[0-1]", RECA_NULL} , - {RECT_CONFIG, "proxy.config.cache.vary_on_user_agent", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} - , // # default the ram cache size to AUTO_SIZE (-1) // # alternatively: 20971520 (20MB) {RECT_CONFIG, "proxy.config.cache.ram_cache.size", RECD_INT, "-1", RECU_RESTART_TS, RR_NULL, RECC_STR, "^-?[0-9]+$", RECA_NULL} @@ -912,8 +910,6 @@ static const RecordElement RecordsConfig[] = {RECT_CONFIG, "proxy.config.cache.ram_cache_cutoff", RECD_INT, "4194304", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} , // # The maximum number of alternates that are allowed for any given URL. - // # It is not possible to strictly enforce this if the variable - // # 'proxy.config.cache.vary_on_user_agent' is set to 1. // # (0 disables the maximum number of alts check) {RECT_CONFIG, "proxy.config.cache.limits.http.max_alts", RECD_INT, "5", RECU_DYNAMIC, RR_NULL, RECC_STR, "^[0-9]+$", RECA_NULL} , http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/proxy/http/HttpTransact.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index fe65f81..c6f55ed 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -66,7 +66,6 @@ static char range_type[] = "multipart/byteranges; boundary=RANGE_SEPARATOR"; #define DebugTxn(tag, ...) DebugSpecific((s->state_machine->debug_on), tag, __VA_ARGS__) extern HttpBodyFactory *body_factory; -extern int cache_config_vary_on_user_agent; static const char local_host_ip_str[] = "127.0.0.1"; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/13053ee3/proxy/http/HttpTransactCache.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransactCache.cc b/proxy/http/HttpTransactCache.cc index 0a790dc..82525d4 100644 --- a/proxy/http/HttpTransactCache.cc +++ b/proxy/http/HttpTransactCache.cc @@ -1238,9 +1238,8 @@ HttpTransactCache::CalcVariability(CacheLookupHttpConfig * http_config_params, H } //////////////////////////////////////////////////////////////////////////////////////// // Special case: if 'proxy.config.http.global_user_agent_header' set // - // we should ignore Vary: User-Agent even if 'proxy.config.cache.vary_on_user_agent' // - // is 1. Actually the 'proxy.config.cache.vary_on_user_agent' is useless in such case // - /////////////////////////////////////////////////////////////////////////////////////// + // we should ignore Vary: User-Agent. // + //////////////////////////////////////////////////////////////////////////////////////// if (http_config_params->cache_global_user_agent_header && !strcasecmp((char *) field->str, "User-Agent")) continue;
