Bug 115501
Summary: | ResourceResponse might let non-lower-cased MIME types into WebCore | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> |
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, darin |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Tim Horton
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
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
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.