diff --git a/CHANGES.rst b/CHANGES.rst index c6818df4..e51fbfa9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,9 +3,11 @@ pywb 2.3.4 changelist * Improvements to auto-fetch to support page fetch (webrecroder/wombat#5, #497) - Support fetching page with ``X-Wombat-History-Page`` and title ``X-Wombat-History-Title`` headers present. - - Attempt to extract title and pass along with cdx to ``_add_history_page()`` callback in RewriterApp, to indicate a url is a page. + - Attempt to extract title and pass along with cdx to ``_add_history_page()`` callback in RewriterApp, to indicate a url is a page. (#498) - General auto-fetch fixes: queue messages if worker not yet inited (in proxy mode), only parse stylesheet hrefs as sheets. +* Cookie Rewriting Fix: don't update cookie cache on service worker (``sw_`` modifier) responses (#499) + pywb 2.3.3 changelist ~~~~~~~~~~~~~~~~~~~~~ diff --git a/pywb/apps/rewriterapp.py b/pywb/apps/rewriterapp.py index dc0ff90a..68a64df3 100644 --- a/pywb/apps/rewriterapp.py +++ b/pywb/apps/rewriterapp.py @@ -383,9 +383,9 @@ class RewriterApp(object): cookie_rewriter = None if self.cookie_tracker and cookie_key: - # skip add cookie if service worker is not 200 -- sw will not be loaded by browser - # so don't update any cookies for it - if wb_url.mod == 'sw_' and record.http_headers.get_statuscode() != '200': + # skip add cookie if service worker is not 200 + # it seems cookie headers from service workers are not applied, so don't update in cache + if wb_url.mod == 'sw_': cookie_key = None cookie_rewriter = self.cookie_tracker.get_rewriter(urlrewriter,