Files
firefox/testing/web-platform/tests/https-upgrades
Mustafa Emre Acer bc62d72bcc Bug 1870124 [wpt PR 43676] - Add WPT for referrer handling in HTTPS Upgrades, a=testonly
Automatic update from web-platform-tests
Add WPT for referrer handling in HTTPS Upgrades

This WPT test checks that HTTPS Upgrading does not drop referrer
information when:
1. Referrer policy is no-referrer-when-downgrade
2. A navigation is made to an URL is HTTP
3. Navigated URL is successfully upgraded to HTTPS

In this scenario, the upgraded HTTPS URL should get the referrer
information since the connection was never downgraded to an unsafe
URL.

The current implementation of HTTPS Upgrades in Chrome doesn't pass
this test, dropping the referrer.

Bug: 1394910
Change-Id: I459e5fcdc97adc19dc42aa5ba1ca0b1617d2158d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5122096
Reviewed-by: Carlos IL <[email protected]>
Commit-Queue: Mustafa Emre Acer <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1237834}

--

wpt-commits: 562cd9772ab708e4ca367ea1efac4833ec1f8b1b
wpt-pr: 43676
2023-12-16 03:57:26 +00:00
..

This directory tests conformance to HTTPS Upgrading feature of Fetch spec.
HTTPS Upgrading automatically upgrades main frame HTTP navigations to HTTPS and
falls back to the original HTTP URL if the upgraded HTTPS URL isn't available.

In practice, HTTPS Upgrading won't work properly with URLs with non-default
ports. This is because the upgrade logic can't guess the HTTPS port and has to
use the same non-default port number for the upgraded HTTPS URL as the HTTP URL.
In other words, upgrading http://example.com:8123 to https://example.com:8123
won't work because the server can't serve both http and https on the same port.

The tests in this directory rely on this fact:
- If HTTPS Upgrading is enabled, http://{{host}}:{{https-port}} will be upgraded
  to https://{{host}}:{{https-port}} and load properly.
- Otherwise, http://{{host}}:{{https-port}} will remain unchanged and won't
  load, since the server serves http URLs on {{http-port}} instead.

Therefore, the simplest way to run these tests is through
[wpt.live](http://wpt.live/https-upgrades) which serves the files over default
ports.