Closed Bug 18817 Opened 25 years ago Closed 25 years ago

{http}autodetection of content-type used

Categories

(Core :: DOM: HTML Parser, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: pierre)

Details

(Whiteboard: waiting for code review)

Attachments

(2 files)

DESCRIPTION: Content-Type's given by HTTP are being overridden by autodetection. This disagrees with HTTP 1.1 ( http://www.ics.uci.edu/pub/ietf/http/rfc2616.txt ) which says, in sec. 7.2.1: # If # and only if the media type is not given by a Content-Type field, the # recipient MAY attempt to guess the media type via inspection of its # content and/or the name extension(s) of the URI used to identify the # resource. If the media type remains unknown, the recipient SHOULD # treat it as type "application/octet-stream". STEPS TO REPRODUCE: * load testcase ACTUAL RESULTS: * paragraph is red EXPECTED RESULTS: * paragraph should not be red DOES NOT WORK CORRECTLY ON: * Linux, mozilla, 1999-11-13-08-M12
Attached file testcase (deleted) —
Assignee: rickg → pierre
Hmm. The parsing engine is being told that the document is text/html, and is accepting that as true; no autodetection is occuring. Since the text is red, I think you're asserting that the linked stylesheet is where the autodetect is occuring, right? If so -- that's over in the style system code. Reassigning to pierre.
I had meant this bug to be a little more general than just CSS. Maybe I'll have to file another one... In fact, for CSS, you might want to fix it only if the document is in strict mode (since there's already a document)...
Status: NEW → ASSIGNED
Whiteboard: waiting for code review
Target Milestone: M13
I have a fix, waiting for code review.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fixed
Reopening. Paragraph is red because the fix for the bug 36872 is imcomplete. /layout/html/document/src/nsHTMLContentSink.cpp, line 3715: if (eDTDMode_noquirks== mode) { should be: if (eDTDMode_strict == mode) { using 2000050408 nightly build on Windows 2000.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Right on! Fix checked in.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Verified fixed using 2000050513 nightly build on Windows 2000.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: