Closed Bug 40096 Opened 25 years ago Closed 25 years ago

Document sent as 'Content-type: text/plain' is interpreted as HTML

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 40060

People

(Reporter: jrgmorrison, Assigned: gagan)

References

()

Details

Overview Description: A minimal document sent as 'Content-type: text/plain' is interpreted as HTML if there is HTML in the text document. In addition, View Source interprets it as HTML (e.g., displays form controls instead of the source document) If no HTML is sent in the text document, then the result is a blank page. Not sure if this is Networking or Parser. Steps to Reproduce: 1) Load http://jrgm.mcom.com/cgi-bin/bugs-misc/send-text-plain 2) Observe the result, and then try View Source on this page Actual Results: HTML form controls are displayed (but none of the preceding ascii text). Expected Results: This is a text document. Reproducibility: always Build Date & Platform Bug Found: 2000052108 win32 (win2k) comm. 2000052108 linux comm. 2000052108 mac comm. 2000051808 mozilla win2k Additional Information: This is the trivial perl source for this page. ---------------------------------------------------------------------- #!/usr/bin/perl -w # # Sends a text/plain document (with only one # header 'Content-type: text/plain' # print <<"ENDOFMESSAGE"; Content-type: text/plain Here is some plain text that talks about some HTML A form looks like ... <FORM METHOD="POST" ACTION="/cgi-bin/foobar"> <SELECT NAME="arg"> <OPTION VALUE="value 1">one option <OPTION VALUE="value 2">another option </SELECT> <INPUT TYPE="submit" VALUE="submit"> </FORM> ENDOFMESSAGE ----------------------------------------------------------------------
40060
Yep, this is a DUP of bug 40060, "text/plain displayed only if interpreted as HTML"... obviously Mozilla is guessing when it shouldn't be. Beyond that, I'm about to submit a bug about the unknown content type guesser being too aggressive in calling files text/html. *** This bug has been marked as a duplicate of 40060 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
verified dup
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.