[PR #7662] Fix split_url for a bracketed IPv6 URL without a port #7745

Open
opened 2026-11-03 07:23:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7662
Author: @ClickingMaster
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/split-url-ipv6


📝 Commits (1)

  • a3f73db Fix split_url for a bracketed IPv6 URL without a port

📊 Changes

1 file changed (+18 additions, -3 deletions)

View changed files

📝 crates/horizon-friends/src/portmap.rs (+18 -3)

📄 Description

🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

Fixes #7628

Cause: split_url (crates/horizon-friends/src/portmap.rs) used rsplit_once(':') on [fe80::1], which splits inside the address, so the port parse failed and the whole URL returned None.

Fix: find the closing ] first; what follows is empty (port 80) or :port. Non-bracketed hosts behave as before.

Test

portmap::tests::parsers gets two IPv6 cases. Before: fails (left: None, right: Some(("fe80::1", 80, "/rootDesc.xml"))). After: passes; cargo test -p horizon-friends 35 passed.

Self-check

  • cargo fmt --check clean; clippy -D warnings on horizon-friends clean
  • pr_ready.py not run: no ALSA headers
  • port_ledger check not runnable: no ledger built on this machine (no vanilla data)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7662 **Author:** [@ClickingMaster](https://github.com/ClickingMaster) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/split-url-ipv6` --- ### 📝 Commits (1) - [`a3f73db`](https://github.com/horizon-rust/horizon/commit/a3f73dbfd1d1d839c1b6572a3183fb6d9ee7ca09) Fix split_url for a bracketed IPv6 URL without a port ### 📊 Changes **1 file changed** (+18 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-friends/src/portmap.rs` (+18 -3) </details> ### 📄 Description > 🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. Fixes #7628 **Cause:** `split_url` (`crates/horizon-friends/src/portmap.rs`) used `rsplit_once(':')` on `[fe80::1]`, which splits inside the address, so the port parse failed and the whole URL returned `None`. **Fix:** find the closing `]` first; what follows is empty (port 80) or `:port`. Non-bracketed hosts behave as before. ## Test `portmap::tests::parsers` gets two IPv6 cases. Before: fails (`left: None, right: Some(("fe80::1", 80, "/rootDesc.xml"))`). After: passes; `cargo test -p horizon-friends` 35 passed. ## Self-check - cargo fmt --check clean; clippy -D warnings on horizon-friends clean - pr_ready.py not run: no ALSA headers - port_ledger check not runnable: no ledger built on this machine (no vanilla data) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7745
No description provided.