trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch master updated: Removes proxy.config.http.cache.allow_empty_doc
Date Mon, 22 Jul 2019 14:46:09 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new d59e329  Removes proxy.config.http.cache.allow_empty_doc
d59e329 is described below

commit d59e329d57c603cdc8fde3826b13fefb4a83f699
Author: Randall Meyer <rrm@apple.com>
AuthorDate: Tue Jul 16 14:04:16 2019 -0700

    Removes proxy.config.http.cache.allow_empty_doc
    
    This feature was originally deprecated in TS-3979/6a36346df8e
---
 doc/admin-guide/files/records.config.en.rst |  9 ---------
 iocore/cache/Cache.cc                       | 15 +++++----------
 mgmt/RecordsConfig.cc                       |  4 ----
 3 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst
index a73b01c..6384543 100644
--- a/doc/admin-guide/files/records.config.en.rst
+++ b/doc/admin-guide/files/records.config.en.rst
@@ -1885,15 +1885,6 @@ Cache Control
    used to purge the entire cache, or just a specific :file:`remap.config`
    rule.
 
-.. ts:cv:: CONFIG proxy.config.http.cache.allow_empty_doc INT 1
-   :reloadable:
-   :deprecated:
-
-   Enables (``1``) or disables (``0``) caching objects that have an empty
-   response body. This is particularly useful for caching 301 or 302 responses
-   with a ``Location`` header but no document body. This only works if the
-   origin response also has a ``Content-Length`` header.
-
 .. ts:cv:: CONFIG proxy.config.http.doc_in_cache_skip_dns INT 1
    :reloadable:
    :overridable:
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index cd2668e..873b4cf 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -82,7 +82,6 @@ int cache_config_read_while_writer             = 0;
 int cache_config_mutex_retry_delay             = 2;
 int cache_read_while_writer_retry_delay        = 50;
 int cache_config_read_while_writer_max_retries = 10;
-static int enable_cache_empty_http_doc         = 0;
 /// Fix up a specific known problem with the 4.2.0 release.
 /// Not used for stripes with a cache version later than 4.2.0.
 int cache_config_compatibility_4_2_0_fixup = 1;
@@ -453,16 +452,14 @@ CacheVC::set_http_info(CacheHTTPInfo *ainfo)
     ainfo->object_key_set(earliest_key);
     // don't know the total len yet
   }
-  if (enable_cache_empty_http_doc) {
-    MIMEField *field = ainfo->m_alt->m_response_hdr.field_find(MIME_FIELD_CONTENT_LENGTH,
MIME_LEN_CONTENT_LENGTH);
-    if (field && !field->value_get_int64()) {
-      f.allow_empty_doc = 1;
-    } else {
-      f.allow_empty_doc = 0;
-    }
+
+  MIMEField *field = ainfo->m_alt->m_response_hdr.field_find(MIME_FIELD_CONTENT_LENGTH,
MIME_LEN_CONTENT_LENGTH);
+  if (field && !field->value_get_int64()) {
+    f.allow_empty_doc = 1;
   } else {
     f.allow_empty_doc = 0;
   }
+
   alternate.copy_shallow(ainfo);
   ainfo->clear();
 }
@@ -3226,8 +3223,6 @@ ink_cache_init(ts::ModuleVersion v)
     cache_config_target_fragment_size = DEFAULT_TARGET_FRAGMENT_SIZE;
   }
 
-  REC_EstablishStaticConfigInt32(enable_cache_empty_http_doc, "proxy.config.http.cache.allow_empty_doc");
-
   REC_EstablishStaticConfigInt32(cache_config_compatibility_4_2_0_fixup, "proxy.config.cache.http.compatibility.4-2-0-fixup");
 
   REC_EstablishStaticConfigInt32(cache_config_max_disk_errors, "proxy.config.cache.max_disk_errors");
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index f573985..9491cdd 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -557,10 +557,6 @@ static const RecordElement RecordsConfig[] =
   ,
   {RECT_CONFIG, "proxy.config.http.cache.generation", RECD_INT, "-1", RECU_DYNAMIC, RR_NULL,
RECC_NULL, nullptr, RECA_NULL}
   ,
-  // Enabling this setting allows the proxy to cache empty documents. This currently requires
-  // that the response has a Content-Length: header, with a value of "0".
-  {RECT_CONFIG, "proxy.config.http.cache.allow_empty_doc", RECD_INT, "1", RECU_DYNAMIC, RR_NULL,
RECC_NULL, "[0-1]", RECA_NULL }
-  ,
   {RECT_CONFIG, "proxy.config.http.cache.ignore_client_no_cache", RECD_INT, "1", RECU_DYNAMIC,
RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.cache.ignore_client_cc_max_age", RECD_INT, "1", RECU_DYNAMIC,
RR_NULL, RECC_INT, "[0-1]", RECA_NULL}


Mime
View raw message