Bug 48773 - Web Inspector: use mimeType from cached resource in case response data contains none.
Summary: Web Inspector: use mimeType from cached resource in case response data contai...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
Depends on:
Reported: 2010-11-01 12:05 PDT by Pavel Feldman
Modified: 2010-11-02 03:32 PDT (History)
10 users (show)

See Also:

[PATCH] Proposed fix. (2.56 KB, patch)
2010-11-01 12:19 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[PATCH] A cleaner patch. (2.92 KB, patch)
2010-11-01 13:43 PDT, Pavel Feldman
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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