Skip to content

fix: normalize direct fetcher URLs#141

Merged
chaliy merged 1 commit into
mainfrom
codex/direct-fetcher-bare-urls
Jul 4, 2026
Merged

fix: normalize direct fetcher URLs#141
chaliy merged 1 commit into
mainfrom
codex/direct-fetcher-bare-urls

Conversation

@chaliy

@chaliy chaliy commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What

Normalize bare domain URLs before parsing inside every built-in public fetcher implementation, so direct Fetcher::fetch calls behave like the registry/tool/client paths.

Why

The previous bare-host fix covered normal fetchkit execution paths, but public fetcher structs could still be called directly with a bare URL and fail at Url::parse(&request.url).

How

  • Added a normalized-copy helper for borrowed FetchRequest values.
  • Normalize at the top of every built-in fetcher fetch() implementation and in DefaultFetcher::fetch_to_file().
  • Added direct-fetcher regression tests using the in-memory transport.
  • Updated stale invalid-URL wording and specs to reflect accepted bare domain URLs.

Risk

  • Low
  • Direct fetcher calls that previously returned InvalidUrlScheme for domain-like bare URLs may now proceed to fetch over HTTPS.

Checklist

  • Unit tests are passed
  • Smoke tests are passed
  • Documentation is updated
  • Specs are up to date and not in conflict
  • Formatting, clippy, tests, docs, and release build smoke passed locally

@chaliy chaliy merged commit 6a65a36 into main Jul 4, 2026
11 checks passed
@chaliy chaliy deleted the codex/direct-fetcher-bare-urls branch July 4, 2026 21:35
@chaliy chaliy mentioned this pull request Jul 4, 2026
8 tasks
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