Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It is known to compile with Clang 7, GCC 8, Microsoft Visual Studio 2017 or late
This library is up to date with the URL Standard published on
[30 October 2025](https://url.spec.whatwg.org/commit-snapshots/52526653e848c5a56598c84aa4bc8ac9025fb66b/),
the URL Pattern Standard published on
[20 March 2026](https://urlpattern.spec.whatwg.org/commit-snapshots/203d435c32272a10bdccc2c6dfa8a51ee5c6b92c/)
[15 June 2026](https://urlpattern.spec.whatwg.org/commit-snapshots/aeb2019cf3aa1fb31af134a682c0255302a41297/)
and supports internationalized domain names as specified in the
[UTS46 Unicode IDNA Compatibility Processing version 17.0.0](https://www.unicode.org/reports/tr46/tr46-35.html).

Expand Down
2 changes: 1 addition & 1 deletion include/upa/urlpattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -2502,7 +2502,7 @@ inline std::string canonicalize_port(std::string_view port_value, std::optional<
if (protocol_value)
urls.set_scheme(*protocol_value);
else
urls.set_scheme("https");
urls.set_scheme("");
// Note, we set the URL record's scheme in order for the basic URL parser
// to recognize and normalize default port values.

Expand Down
16 changes: 10 additions & 6 deletions test/data/my-urlpatterntestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@
{
"pattern": [{ "port": "443" }],
"inputs": [{ "port": "443" }],
"exactly_empty_components": [ "port" ],
"expected_match": null
"expected_obj": {
"port": "443"
},
"expected_match": {
"port": { "input": "443", "groups": {}}
}
},
{
"pattern": [{ "port": "443" }],
"inputs": [{ "port": "" }],
"exactly_empty_components": [ "port" ],
"expected_match": {
"port": { "input": "", "groups": {}}
}
"expected_obj": {
"port": "443"
},
"expected_match": null
},
{
"pattern": [{ "pathname": "path/.." }],
Expand Down
2 changes: 1 addition & 1 deletion test/download-tests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ REM Commit hash of URL Pattern web-platform-tests
REM
REM Run tools\update-wpt.py to update to the latest commit hash from
REM https://github.com/web-platform-tests/wpt/tree/master/urlpattern
set URLP_HASH=2f28df545cb4f16c99249b3db05c75495afeaaee
set URLP_HASH=23aac9278460a73394585ff5a15b6a04dfcd5ec8

for %%f in (urlpatterntestdata.json) do (
curl -fsS -o %p%\wpt\%%f https://raw.githubusercontent.com/web-platform-tests/wpt/%URLP_HASH%/urlpattern/resources/%%f
Expand Down
2 changes: 1 addition & 1 deletion test/download-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ done
#
# Run tools/update-wpt.py to update to the latest commit hash from
# https://github.com/web-platform-tests/wpt/tree/master/urlpattern
URLP_HASH=2f28df545cb4f16c99249b3db05c75495afeaaee
URLP_HASH=23aac9278460a73394585ff5a15b6a04dfcd5ec8

for f in urlpatterntestdata.json
do
Expand Down
Loading