RESOLVED FIXED 31868
Web Inspector: Load InspectorResource mime type from CachedResource for 304 response
https://bugs.webkit.org/show_bug.cgi?id=31868
Summary Web Inspector: Load InspectorResource mime type from CachedResource for 304 r...
Alexander Pavlov (apavlov)
Reported 2009-11-25 06:26:31 PST
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.
Attachments
patch (2.29 KB, patch)
2009-11-25 07:29 PST, Alexander Pavlov (apavlov)
pfeldman: review-
patch (fixed) (2.31 KB, patch)
2009-11-25 07:42 PST, Alexander Pavlov (apavlov)
no flags
Alexander Pavlov (apavlov)
Comment 1 2009-11-25 07:29:32 PST
Pavel Feldman
Comment 2 2009-11-25 07:34:19 PST
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?
Alexander Pavlov (apavlov)
Comment 3 2009-11-25 07:42:01 PST
Created attachment 43845 [details] patch (fixed)
WebKit Commit Bot
Comment 4 2009-11-25 08:15:47 PST
Comment on attachment 43845 [details] patch (fixed) Clearing flags on attachment: 43845 Committed r51385: <http://trac.webkit.org/changeset/51385>
WebKit Commit Bot
Comment 5 2009-11-25 08:15:59 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.