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: Deals better with Cc: max-age=0
Date Thu, 06 Dec 2018 17:02:29 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 0b80592  Deals better with Cc: max-age=0
0b80592 is described below

commit 0b80592bc472d5394c777d0fca66f72779276cf2
Author: Leif Hedstrom <zwoop@apache.org>
AuthorDate: Thu Dec 6 08:58:00 2018 -0700

    Deals better with Cc: max-age=0
    
    There's a small window where we can still serve cached responses even
    when they have a Cache-Control: max-age=0.
    
    This fixes the cache-tests checks for id=freshness-max-age-0 and
    id=freshness-max-age-0-expires.
---
 proxy/http/HttpTransact.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 3c92d02..2c06b77 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -7324,7 +7324,7 @@ HttpTransact::what_is_document_freshness(State *s, HTTPHdr *client_request,
HTTP
   // now, see if the age is "fresh enough" //
   ///////////////////////////////////////////
 
-  if (do_revalidate || current_age > age_limit) { // client-modified limit
+  if (do_revalidate || !age_limit || current_age > age_limit) { // client-modified limit
     TxnDebug("http_match", "[..._document_freshness] document needs revalidate/too old; "
                            "returning FRESHNESS_STALE");
     return (FRESHNESS_STALE);


Mime
View raw message