Bug 48773

Summary: Web Inspector: use mimeType from cached resource in case response data contains none.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed fix.
none
[PATCH] A cleaner patch. joepeck: review+

Description Pavel Feldman 2010-11-01 12:05:44 PDT
For 304 Not Modified resources, response does not contain the mimeType data. Use the one from CachedResource in such cases.
Comment 1 Joseph Pecoraro 2010-11-01 12:16:01 PDT
Someone just opened the following a few days ago:
<http://webkit.org/b/48525> Web Inspector: Incorrectly reports warning on missing/incorrect content-type for 304s

Is this a duplicate?
Comment 2 Pavel Feldman 2010-11-01 12:19:20 PDT
Created attachment 72539 [details]
[PATCH] Proposed fix.
Comment 3 Pavel Feldman 2010-11-01 12:21:41 PDT
Hard to tell since the original report references localhost :) But we have good chances of fixing that issue once this patch lands.
Comment 4 Pavel Feldman 2010-11-01 13:43:29 PDT
Created attachment 72550 [details]
[PATCH] A cleaner patch.
Comment 5 Joseph Pecoraro 2010-11-01 14:44:21 PDT
Comment on attachment 72550 [details]
[PATCH] A cleaner patch.

lol, I was just going to suggest that exact change after looking at your first patch. Thanks for making it clearer. You could save a null check by moving this into the "if (cachedResource)" block above, but this is very readable.
Comment 6 Joseph Pecoraro 2010-11-01 14:46:49 PDT
Oh, and it would be awesome if you could check if this fixes bug 48525 after landing.
Comment 7 Pavel Feldman 2010-11-02 03:32:12 PDT
Comment on attachment 72550 [details]
[PATCH] A cleaner patch.

Committing to http://svn.webkit.org/repository/webkit/trunk
        M       WebCore/ChangeLog
        M       WebCore/inspector/InspectorResourceAgent.cpp
        M       WebCore/inspector/front-end/NetworkPanel.js
Committed r71108