fix: don't warn on .text() usage with image/svg+xml#6269
Open
Cherry wants to merge 3 commits intocloudflare:mainfrom
Open
fix: don't warn on .text() usage with image/svg+xml#6269Cherry wants to merge 3 commits intocloudflare:mainfrom
Cherry wants to merge 3 commits intocloudflare:mainfrom
Conversation
anonrig
reviewed
Mar 6, 2026
anonrig
approved these changes
Mar 6, 2026
This comment was marked as off-topic.
This comment was marked as off-topic.
Contributor
Author
|
That benchmark seems unrelated and spikes every so often in unrelated changes as per https://codspeed.io/cloudflare/workerd/benchmarks/src/workerd/tests/bench-response.c%2B%2B::bodyWithHeaders%5BResponse%5D?runnerMode=Simulation&branchId=69ab239b9c8e9085e4f270c0. If that's not the case, please let me know. |
Member
|
Yes, benchmark is flaky. No need to worry about that. I've rerun the CI. |
jasnell
approved these changes
Mar 7, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6269 +/- ##
==========================================
- Coverage 70.69% 70.67% -0.03%
==========================================
Files 417 417
Lines 111111 111127 +16
Branches 18331 18346 +15
==========================================
- Hits 78552 78536 -16
- Misses 21614 21630 +16
- Partials 10945 10961 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After bumping some dependencies in a project, I started seeing this log in my tests:
This PR updates the detection here to also allow
image/svg+xml. As per https://datatracker.ietf.org/doc/html/rfc6838, it seems that allowing+xmlat the end of any mimetype is fine to be treated as text:Let me know if any tweaks are needed - I included tests where it made sense.