Bug 48525 - Web Inspector: Incorrectly reports warning on missing/incorrect content-type for 304s
Summary: Web Inspector: Incorrectly reports warning on missing/incorrect content-type ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-28 08:09 PDT by Derk-Jan Hartman
Modified: 2011-04-04 06:17 PDT (History)
13 users (show)

See Also:


Attachments
[PATCH] Suggested fix (1.73 KB, patch)
2011-04-04 00:55 PDT, Alexander Pavlov (apavlov)
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Derk-Jan Hartman 2010-10-28 08:09:40 PDT
I have a webrequest of the form: http://localhost/wiki/load.php?debug=true&lang=en&modules=mediawiki.legacy.commonPrint&only=styles&skin=vector

This has the Content-Type for CSS.

When I reload my page, the same request responds with a 304 Not Modified. In this case the content-type is stripped from the response header, because per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html such responses do not have a content-type.

The inspector reports in this case: "Resource interpreted as script but transferred with MIME type text/php.", whereas it should assume the content-type of the earlier request, it apparently is assuming the content-type of the file extension.
Comment 1 Barney Stratford 2011-04-03 11:23:19 PDT
I can confirm the presence of this issue but do not have permission to update the bug's status. In my case I was using a Python-generated CSS.
Comment 2 Alexander Pavlov (apavlov) 2011-04-04 00:55:52 PDT
Created attachment 88040 [details]
[PATCH] Suggested fix
Comment 3 Alexander Pavlov (apavlov) 2011-04-04 04:35:00 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       Source/WebCore/ChangeLog
        M       Source/WebCore/inspector/front-end/Resource.js
Committed r82822
Comment 4 WebKit Review Bot 2011-04-04 06:17:16 PDT
http://trac.webkit.org/changeset/82822 might have broken Leopard Intel Debug (Tests)
The following tests are not passing:
fast/preloader/scan-body-from-head-script.html