Currently, the mime type of cached resources is provided to the InspectorController in ResourceResponses (coming directly from the CFNetwork library). Since WebCore issues an "If-Modified-Since" request header, it is supposed to know the actual resource data it tries to revalidate. Other network libraries may fail to provide the revalidated resource mime type in the ResourceResponse, as the "Content-Type" header is absent in the 304 HTTP response, which results in a failure to determine the cached resource mime type in the Web Inspector.
Created attachment 43843 [details] patch
Comment on attachment 43843 [details] patch > + if (response.httpStatusCode() == 304) { > + CachedResource* cachedResource = cache()->resourceForURL(response.url().string()); > + if (cachedResource) > + m_mimeType = cachedResource->response().mimeType(); > + } Could you do this only in case network stack did not provide this information && 304?
Created attachment 43845 [details] patch (fixed)
Comment on attachment 43845 [details] patch (fixed) Clearing flags on attachment: 43845 Committed r51385: <http://trac.webkit.org/changeset/51385>
All reviewed patches have been landed. Closing bug.