Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a88522986
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
View guided diff | Re-trigger cubic
Summary
A URL can name an IPv6 zone in two ways:
[fe80::1%25en0], the RFC 6874 form, and the bare[fe80::1%en0]. The parser kept whatever was typed, so the two were different hosts:The
%25form was passed to the socket as-is, so it never reached the interface. Against a server onfe80::1%lo0(macOS):http://[fe80::1%lo0]:8768/http://[fe80::1%25lo0]:8768/ConnectError: [Errno 65] No route to hostThe zone is now parsed once, in
encode_host():URL.hostandURL.raw_hosthold the decoded form,fe80::1%en0. That is what the socket needs.str(url)andURL.netlocalways write%25, the formcurland Go write too.URLand the sameOrigin.Why it is safe for the same-origin check
#1134 kept the two spellings as distinct origins because the transport connected to different places for each. Decoding only inside
Originwould have let a redirect keepAuthorizationwhile connecting elsewhere.Here the decoding happens in the parser, so
Originand the transport read the same host. Only the%25delimiter is decoded.[2001:db8::1%30]keeps the zone30and is still a different origin from[2001:db8::10].Ambiguity
A bare zone that starts with
25, such as%251, is read as the RFC 6874 form, so the zone is1. Write%25251for a zone named251.curlresolves it the same way.This applies to URL text and to a bracketed
host=. Ahost=without brackets is taken as the decoded form, sourl.copy_with(host=url.host)never changes the zone.Not included
Hostheader still carries the zone. That is #1360.httpcore2still sends the zone in the proxyCONNECTtarget and as the TLSserver_hostname.URL, only inOrigin, as before.Checklist
Session:
pi --session 01a20ced-af54-7647-a636-b3d9c9458448