fix: detect +xml content types as text - #612
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesRSS text detection
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #597.
detectResponseTypeonly treated a fixed set of content types as text (application/xml,application/xhtmland so on) plus anything starting withtext/. Subtypes with a+xmlsuffix likeapplication/rss+xmlorapplication/atom+xmlfell through toblob, so an RSS feed came back as aBlobinstead of a string.This adds a
+xmlsuffix check alongside the existing ones, mirroring how JSON already matches+jsonsubtypes. Added a test that anapplication/rss+xmlresponse is parsed as text.Summary by CodeRabbit
+xmlmedia types.