NEW 115501
ResourceResponse might let non-lower-cased MIME types into WebCore
https://bugs.webkit.org/show_bug.cgi?id=115501
Summary ResourceResponse might let non-lower-cased MIME types into WebCore
Tim Horton
Reported 2013-05-01 17:38:56 PDT
I don't see any code that ensures that the MIME type which ResourceResponseMac's ResourceResponse::platformLazyInit extracts from NSURLResponse (via -MIMEType) is lower-cased, but much of WebCore depends on MIME types being lower-cased. It seems like it would be ideal to fix this in a cross-platform way, somewhere above ResourceResponse::platformLazyInit (maybe ResourceResponseBase::lazyInit, I don't know... and also in ResourceResponseBase::setMimeType).
Attachments
Alexey Proskuryakov
Comment 1 2013-05-01 22:05:39 PDT
I am not sure if it's ResourceResponse responsibility to change what is sent by the server. For example, we should probably report the actual type in Web Inspector, which would be impossible if we lowercased the type here.
Darin Adler
Comment 2 2013-05-02 09:21:52 PDT
It’s too bad, since ResourceResponse is a convenient bottleneck. Worth thinking through where else it would be practical to do the case insensitivity or canonicalization.
Note You need to log in before you can comment on or make changes to this bug.