-
Notifications
You must be signed in to change notification settings - Fork 54
Handle incorrect browser-supplied mime type #790
Copy link
Copy link
Closed
Labels
✨ enhancementNew feature or requestNew feature or request
Description
Misconfigured servers may sometimes forget to include a Content-Type header, which is where a response's mime type is inferred from. It appears, however, that while the browser renders responses with missing content-types fine due to mime type sniffing, the response.mimeType CDP property does not convey that inferred mime type. Instead, the property defaults to text/plain, which is usually incorrect.
In asset discovery, we should add logic around text/plain response mime types that ensure there is a Content-Type header. If there is no header, and the response URL contains an extension, we should infer the mime type ourselves.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
✨ enhancementNew feature or requestNew feature or request