Open Bug 385166 Opened 14 years ago Updated 14 years ago

Gecko applies style sheets with Content-Type:"null" in standards mode


(Core :: CSS Parsing and Computation, defect)

Not set




(Reporter: annevk, Unassigned)


Apparently the checking for style sheet response headers isn't as strict as I was led to believe. It seems that if there's no / or \ in the response Content-Type it is simply ignored and the style sheet is applied. This seems like a bug.
A comparison against "UNKNOWN_CONTENT_TYPE" was added in bug 177026, which seems likely to have caused this (original implementation of this behavior was in bug 46225).
Component: Layout → Style System (CSS)
OS: Linux → All
QA Contact: layout → style-system
Hardware: PC → All
Version: unspecified → Trunk
Please let me know the outcome of fixing this bug so that I can determine whether or not to change the HTML5 spec. Thanks!
The HTTP implementation in necko treats a Content-Type header that does not parse as a valid content type as equivalent to a non-existent Content-Type header.

The CSS loader assumes that things without a Content-Type header are CSS, which I think is what we want it to be doing.

So there's definitely no style system bug here.  I would say there is no Necko bug either.
You need to log in before you can comment on or make changes to this bug.