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 2014/08/20 04:06:08 UTC

git commit: TS-2584: Remove assert for negatively cached transformed content.

Repository: trafficserver
Updated Branches:
  refs/heads/master 261b19ee3 -> 2dbfeae15


TS-2584: Remove assert for negatively cached transformed content.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2dbfeae1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2dbfeae1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2dbfeae1

Branch: refs/heads/master
Commit: 2dbfeae15daa4f6675f4d3c7e10511cc872d077d
Parents: 261b19e
Author: Jack Bates <ja...@nottheoilrig.com>
Authored: Tue Aug 19 21:04:00 2014 -0500
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Tue Aug 19 21:05:11 2014 -0500

----------------------------------------------------------------------
 CHANGES                    |  3 +++
 proxy/http/HttpTransact.cc | 11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2dbfeae1/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2285405..3eb8828 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.1.0
 
+  *) [TS-2584] Remove assert for negatively cached transformed objects.
+
+  *) [TS-3001] GlobalSign responds 403 when OCSP request posted without Host header
 
   *) [TS-2913] Missing body factory template for permanent redirects.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2dbfeae1/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 4266d5f..39f0ed9 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -4794,11 +4794,14 @@ HttpTransact::set_headers_for_cache_write(State* s, HTTPInfo* cache_info, HTTPHd
     request->url_set(s->hdr_info.client_request.url_get());
   }
   cache_info->request_set(request);
-  if (!s->negative_caching)
+  /* Why do we check the negative caching case? No one knows. This used to assert if the cache_info
+     response wasn't already valid, which broke negative caching when a transform is active. Why it
+     wasn't OK to pull in the @a response explicitly passed in isn't clear and looking at the call
+     sites yields no insight. So the assert is removed and we keep the behavior that if the response
+     in @a cache_info is already set, we don't override it.
+  */
+  if (!s->negative_caching || !cache_info->response_get()->valid())
     cache_info->response_set(response);
-  else {
-    ink_assert(cache_info->response_get()->valid());
-  }
 
   if (s->api_server_request_body_set)
     cache_info->request_get()->method_set(HTTP_METHOD_GET, HTTP_LEN_GET);