1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

cookie cache fix: don't cache headers for service workers generally (#499)

update CHANGELIST for 2.3.4
This commit is contained in:
Ilya Kreymer 2019-08-20 14:54:23 -04:00 committed by GitHub
parent 1e9d8f44af
commit bdf4a26807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -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 <link> stylesheet hrefs as sheets.
* Cookie Rewriting Fix: don't update cookie cache on service worker (``sw_`` modifier) responses (#499)
pywb 2.3.3 changelist
~~~~~~~~~~~~~~~~~~~~~

View File

@ -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,