Repository navigation
v0.2.0 — Track crate 0.2.0
·
4 commits
to main
since this release
Tracks upstream tsip-parser 0.2.0.
What changed
Behavior, not API. The Ruby surface (TsipParser::Uri, ::Address, ParseError, helper methods) is identical to 0.1.0. What moved is the accepted-input set:
- Accepts pct-encoded userinfo specials.
- Accepts
<in param keys. - Accepts leading/trailing whitespace in URI-level param/header values.
- Round-trip stability is preserved via render-side pct-escape — pct-decoded fields (userinfo, URI header key/value) are pct-escaped when
to_sserializes.
Narrow parse-time rejections still remain for bytes that literal param storage cannot round-trip: > in any param, ? in URI-level params.
Performance
M1 macOS, Ruby 4.0.1, release build:
| endpoint | tsip_parser | tsip-core | speedup |
|---|---|---|---|
Uri.parse |
654k ips | 41k ips | 16.1× |
Address.parse |
695k ips | 41k ips | 16.8× |
Slightly faster than 0.1.0 (permissive parse skips validation work).
Upgrade notes
Drop-in. If your code depended on InvalidHost being raised for previously-rejected inputs, those will now parse — audit any call sites that did rescue TsipParser::ParseError expecting that specific behavior.
Install
gem install tsip_parserRubyGems: https://rubygems.org/gems/tsip_parser/versions/0.2.0