Skip to content

v0.2.1 — Escape parity with crate Display

Choose a tag to compare

@team-milestone-alfonso team-milestone-alfonso released this 19 Apr 09:52
· 3 commits to main since this release

Tracks upstream tsip-parser 0.2.1.

What changed

Accepts URI-level param keys/values containing ; ? & = < >. Round-trip stability comes from render-side pct-escape (lowercase hex). Closes the last xoracle parity case (sip:alice@host;<evil>=1) vs the Ruby tsip-core reference.

Gem-side fix (behavioral)

Previously the Ruby serialization path — triggered once params or headers was touched — wrote fields literally, diverging from the Rust Display for inputs with @ : ; ? < > % & = or whitespace. Now Uri#append_to mirrors the crate's escape set so fast-path and slow-path produce identical output.

Performance

M1 macOS, Ruby 4.0.1, release build:

endpoint tsip_parser tsip-core speedup
Uri.parse 646k ips 41k ips 15.8×
Address.parse 694k ips 41k ips 16.8×

Escape runs only on the mutation-touched slow path, so parse throughput is unchanged from 0.2.0.

Upgrade notes

Drop-in. If you had rescue TsipParser::ParseError catching inputs with > in params, those now parse — audit and simplify.

Install

gem install tsip_parser

RubyGems: https://rubygems.org/gems/tsip_parser/versions/0.2.1