-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Safari adds pragma header to Service Worker requests with active Serv…
…ice Worker https://bugs.webkit.org/show_bug.cgi?id=264388 rdar://118442076 Reviewed by Chris Dumez. Remove Pragma header if not in the keep list as done for other headers like Cache-Control. Reorder a bit the code to sort the handling of headers to keep in lexicographical order. * LayoutTests/http/wpt/service-workers/cache-control-request-expected.txt: * LayoutTests/http/wpt/service-workers/cache-control-request.html: * LayoutTests/http/wpt/service-workers/resources/cross-origin-allow.py: (main): * Source/WebCore/loader/CrossOriginAccessControl.cpp: (WebCore::httpHeadersToKeepFromCleaning): (WebCore::cleanHTTPRequestHeadersForAccessControl): * Source/WebCore/loader/CrossOriginAccessControl.h: * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: Canonical link: https://commits.webkit.org/270819@main
- Loading branch information
Showing
6 changed files
with
38 additions
and
17 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
LayoutTests/http/wpt/service-workers/cache-control-request-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
|
||
PASS Setup worker | ||
PASS Ensure cache-control does not break service worker fetch handling | ||
PASS Ensure pragma does not break service worker fetch handling | ||
PASS Ensure beacon headers are not broken by service worker fetch handling | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
LayoutTests/http/wpt/service-workers/resources/cross-origin-allow.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
def main(request, response): | ||
value = request.headers.get("Cache-Control", "no cache-control header") | ||
if b"pragma" in request.GET: | ||
value = request.headers.get("Pragma", "no pragma header") | ||
|
||
return 200, [(b"Content-Type", b"text/ascii"), (b"Access-Control-Allow-Origin", "*")], value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters