Skip to content

Commit d8c0b55

Browse files
srweichromium-wpt-export-bot
authored andcommitted
Enable RemovePurposeHeaderForPrefetch and Remove Purpose: prefetch header from tests.
Now that prefetches and prerenders are utilizing the Sec-Purpose header for prefetches and prerenders, we will move to remove the legacy Purpose: prefetch header that is still currently passed. This will be behind a feature flag/ kill switch to prevent compat issues. This will be scoped to speculation rules prefetch, speculation rules prerender, <link rel=prefetch>, and Chromium's non-standard <link rel=prerender>. chromestatus: https://chromestatus.com/feature/5088012836536320 blink-dev: https://groups.google.com/a/chromium.org/g/blink-dev/c/iBAJV-lgfLI Bug: 420724819 Change-Id: I81dafe67a3d9eca72f7d6b0a75e66e921b5a0443 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6680595 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Steven Wei <[email protected]> Reviewed-by: Hiroki Nakagawa <[email protected]> Cr-Commit-Position: refs/heads/main@{#1498327}
1 parent a634fb2 commit d8c0b55

File tree

1 file changed

+2
-2
lines changed
  • speculation-rules/prerender/resources

1 file changed

+2
-2
lines changed

speculation-rules/prerender/resources/exec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33

44
def main(request, response):
5-
purpose = request.headers.get(b"purpose")
6-
if (purpose == b'prefetch' and b"code" in request.GET):
5+
sec_purpose = request.headers.get(b"sec-purpose")
6+
if (sec_purpose == b'prefetch;prerender' and b"code" in request.GET):
77
code = int(request.GET.first(b"code"))
88
else:
99
code = 200

0 commit comments

Comments
 (0)