json-ld icon indicating copy to clipboard operation
json-ld copied to clipboard

relax content-type detection rules to allow prefix-match

Open ragne opened this issue 2 years ago • 0 comments

Hi, thanks for the crate!~

When I tried to use ReqwestLoader , I've noticed that it doesn't parse my input at all, because in my case server sends the header like that: Content-Type: application/ld+json; charset=UTF-8 (MDN docs confirms that it's kinda standard), which is of course won't be matched. So I've changed is_json_media_type to just do starts_with matching which should handle both old and new cases.

ragne avatar Apr 11 '22 16:04 ragne