Skip to content

Commit f5f8d9a

Browse files
committed
Reimplement HTTP::URI with native component storage
Replace Addressable::URI delegation with direct instance variables for all URI components (scheme, user, password, host, port, path, query, fragment). ASCII URIs are now parsed with Ruby's stdlib URI module; Addressable is only used as a fallback for non-ASCII (IRI) strings and for IDNA host normalization.
1 parent 0d8463f commit f5f8d9a

6 files changed

Lines changed: 692 additions & 73 deletions

File tree

.mutant.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ matcher:
2727
- HTTP::Redirector*
2828
- HTTP::Features::RaiseError*
2929
- HTTP::Base64*
30+
ignore:
31+
- HTTP::URI.parse_with_addressable

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
`Response.new`, `Redirector.new`, `Retriable::Performer.new`,
1919
`Retriable::DelayCalculator.new`, and `Timeout::Null.new` (and subclasses).
2020
`HTTP::URI.new` also no longer accepts `Addressable::URI` objects.
21+
- Reimplement `HTTP::URI` with native component storage instead of delegating
22+
to `Addressable::URI`. ASCII URIs are now parsed with Ruby's stdlib `URI`,
23+
with Addressable used only as a fallback for non-ASCII (IRI) strings. This
24+
removes most of the runtime dependency on the `addressable` gem while
25+
preserving full URI functionality.
2126
- **BREAKING** Extract request building into `HTTP::Request::Builder`. The
2227
`build_request` method has been removed from `Client`, `Session`, and the
2328
top-level `HTTP` module. Use `HTTP::Request::Builder.new(options).build(verb, uri)`

0 commit comments

Comments
 (0)