Skip to content

Accept URIs' own rejection of a malformed authority in the URL test - #1503

Closed
quinnj wants to merge 1 commit into
masterfrom
claude/uris-parse-error-test
Closed

quinnj wants to merge 1 commit into
masterfrom
claude/uris-parse-error-test

Conversation

@quinnj

@quinnj quinnj commented Oct 22, 2026

Copy link
Copy Markdown
Member

Master CI on bc1b974 (the 2.12.0 bump) fails in every test job at one assertion:

HTTP URL authority characters: Test Failed at test/http_client_tests.jl:1213
  Expression: HT._parse_http_url(HT.URI("http://[::1]evil.com/"))
    Expected: ArgumentError
      Thrown: URIs.ParseError

URIs 1.7.2 was registered after #1498's CI ran, and its JuliaWeb/URIs.jl#87 makes URI("http://[::1]evil.com/") throw ParseError instead of returning host "::1" and path "evil.com/". The test builds that URI before HTTP sees it, so the call now fails inside URIs. HTTP's own behavior is unchanged: _parse_http_url on a string does its own parsing and still throws ArgumentError for these URLs (the loop above this line passes on 1.7.2).

The test now accepts either error: ParseError from URIs 1.7.2 and later, ArgumentError from HTTP when an older URIs (compat allows 1.6.1) produces that URI. Test-only change.

Verification: the full suite with URIs 1.7.2 on Julia 1.13.2 locally (see below), and this PR's CI, which now resolves URIs 1.7.2.

🤖 Generated with Claude Code

URIs 1.7.2 rejects "http://[::1]evil.com/" when parsing it, so the test's
URI(...) call throws URIs.ParseError before HTTP sees the URI. Earlier URIs
versions parse it to host "::1" and path "evil.com/", which HTTP rejects
with ArgumentError. Accept either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@quinnj quinnj closed this Oct 22, 2026
@quinnj
quinnj deleted the claude/uris-parse-error-test branch October 22, 2026 16:55
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.

1 participant