Skip to content

Validate presence of host for HTTP/HTTPS URLs in Automatic::Http - #157

Merged
id774 merged 1 commit into
masterfrom
codex
Aug 21, 2026
Merged

Validate presence of host for HTTP/HTTPS URLs in Automatic::Http#157
id774 merged 1 commit into
masterfrom
codex

Conversation

@id774

@id774 id774 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Ensure the HTTP helper refuses malformed HTTP/HTTPS strings that contain no host so the framework does not attempt an unintended network request or produce unclear internal errors.

Description

  • Add a host presence check to Automatic::Http.uri that raises ArgumentError with a clear message when an http/https URL has no host, and normalize the parsed URI as before.
  • Add spec coverage in spec/lib/automatic/http_spec.rb for URLs without a host and update fetchable? expectations accordingly.
  • Update doc/VERSIONS and file timestamps to reflect the change.

Testing

  • Ran rspec spec/lib/automatic/http_spec.rb to exercise the Automatic::Http behavior and the new examples, and the test run passed.

Codex Task

@id774
id774 merged commit f6706f3 into master Aug 21, 2026
8 checks passed
@id774
id774 deleted the codex branch August 21, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant