Skip to content

fix: decode non-ASCII response header values as ISO-8859-1#434

Merged
barjin merged 2 commits intomasterfrom
fix/non-ascii-header-values
Apr 13, 2026
Merged

fix: decode non-ASCII response header values as ISO-8859-1#434
barjin merged 2 commits intomasterfrom
fix/non-ascii-header-values

Conversation

@barjin
Copy link
Copy Markdown
Member

@barjin barjin commented Apr 13, 2026

Fixes #430

HeaderValue::to_str() rejects any non-ASCII bytes, which caused Node bindings to crash and Python bindings to silently return empty strings when servers sent headers like last-modified: Dienstag, 31. März 2026.

Replaced with a per-byte ISO-8859-1 decode (b as char), which maps bytes 0x00–0xFF directly to Unicode codepoints U+0000–U+00FF. This matches the obs-text allowance in RFC 9110 §5.5.

@github-actions github-actions Bot added this to the 138th sprint - Tooling team milestone Apr 13, 2026
@github-actions github-actions Bot added t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics. labels Apr 13, 2026
@barjin barjin merged commit f67eb04 into master Apr 13, 2026
47 of 48 checks passed
@barjin barjin deleted the fix/non-ascii-header-values branch April 13, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes on non-ASCII header values

2 participants