This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 264f20a0 Oops, allow for recent CSP return
264f20a0 is described below

commit 264f20a0aaf01d79460019cf25c7fc79d3ae7f9e
Author: Sebb <[email protected]>
AuthorDate: Sat Oct 25 16:49:02 2025 +0100

    Oops, allow for recent CSP return
---
 lib/whimsy/cache.rb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/whimsy/cache.rb b/lib/whimsy/cache.rb
index 9bb917d5..b2b7c10a 100644
--- a/lib/whimsy/cache.rb
+++ b/lib/whimsy/cache.rb
@@ -62,8 +62,11 @@ class Cache
     age, lastmod, uri, etag, data, csp = read_cache(url)
     Wunderbar.debug "#{uri} #{age} LM=#{lastmod} ET=#{etag}"
     if age < minage
-      # if (@save_csp)
-      # return uri, data, 'recent' # we have a recent cache entry
+      if (@save_csp)
+        return uri, data, 'recent', csp # we have a recent cache entry
+      else
+        return uri, data, 'recent' # we have a recent cache entry
+      end
     end
 
     # Try to do a conditional get

Reply via email to