[whatwg/url] Make port state override return failure more for URLPattern (PR #866)

In particular for inputs that do not start with an ASCII digit.

Tests: https://github.com/web-platform-tests/wpt/pull/51505.

This fixes https://github.com/whatwg/urlpattern/issues/266.

<!--
Thank you for contributing to the URL Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.

When you submit this PR, and each time you edit this comment (including checking a checkbox through the UI!), PR Preview will run and update it. As such make any edits in one go and only after PR Preview has run.

If you think your PR is ready to land, please double-check that the build is passing and the checklist is complete before pinging.
-->

- [ ] At least two implementers are interested (and none opposed):
   * WebKit
   * …
- [x] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * See above.
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: …
   * Gecko: …
   * WebKit: N/A
   * Deno: …
   * Node.js: …
- [x] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: N/A
- [x] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/url/866.html" title="Last updated on Mar 20, 2025, 9:45 PM UTC (cdd32a1)">Preview</a> | <a href="https://whatpr.org/url/866/c23aec1...cdd32a1.html" title="Last updated on Mar 20, 2025, 9:45 PM UTC (cdd32a1)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/url/pull/866

-- Commit Summary --

  * Make port state override return failure more for URLPattern

-- File Changes --

    M url.bs (16)

-- Patch Links --

https://github.com/whatwg/url/pull/866.patch
https://github.com/whatwg/url/pull/866.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/pull/866
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/pull/866@github.com>

Received on Thursday, 20 March 2025 21:45:46 UTC