Skip to content

Fix useless encoding in rewrite_str#316

Merged
orium merged 1 commit into
mainfrom
rewrite_str
Apr 28, 2026
Merged

Fix useless encoding in rewrite_str#316
orium merged 1 commit into
mainfrom
rewrite_str

Conversation

@kornelski

@kornelski kornelski commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

rewrite_str wasn't expecting Settings to allow non-UTF-8 encoding, and the final String conversion could fail.

It doesn't make sense to set any other encodings in rewrite_str, because the input is a UTF-8-only &str, so I've made it fix settings to keep UTF-8.

I've reused UTF-8 chunker we have for streaming handlers, so it can do UTF-8 validation incrementally.

@kornelski kornelski requested review from a team, Noah-Kennedy, jasnell and orium as code owners April 27, 2026 22:01
@orium orium merged commit 9a96ea0 into main Apr 28, 2026
6 checks passed
@orium orium deleted the rewrite_str branch April 28, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants