Skip to content

[Sync-EN] Fix the Uri\WhatWg\Url screens that ignore URL normalization - #1793

Open
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:sync-en/1610
Open

[Sync-EN] Fix the Uri\WhatWg\Url screens that ignore URL normalization#1793
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:sync-en/1610

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Syncs the three reference/uri/uri/whatwg/url/ pages with php/doc-en#5721.

The example outputs did not match what the code actually prints, because they ignored WHATWG URL normalization:

  • getPort(): the example used https://example.com:443 and claimed it prints 443. 443 is the default port for https, so it is not stored and getPort() returns null. The example now shows both cases, with var_dump().
  • withPort(): same problem; withPort(443) on an https URL yields null, and a second call with 8443 shows a non-default port being kept.
  • parse(): toAsciiString() on https://example.com prints https://example.com/, with the normalized trailing slash.

EN-Revision bumped to 0e06411471a898974e114bd57f624781fe3a0b89 on the three files.

Fixes: #1610

@lacatoire
lacatoire requested a review from a team as a code owner August 31, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sync EN] uri: Fix Uri\WhatWg\Url screens that ignore URL normalization

1 participant