Closed Bug 38031 Opened 24 years ago Closed 21 years ago

RFE: prefer text/html over text/plain content

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

VERIFIED WORKSFORME
Future

People

(Reporter: isoma, Assigned: darin.moz)

References

()

Details

From Bugzilla Helper:
BuildID:    2000022916

This URL normally gets the HTML version.  There's also a plain text version
available and content-negotiation will allow user agents that
prefer plain text to get it.  Mozilla should prefer the marked up version.

Reproducible: Always
Steps to Reproduce:
1. Type in the URL http://www.compsoc.man.ac.uk/~isoma/spare/oblique
2. Behold ye


Actual Results:  I saw the plain text version of the page

Expected Results:  I expected to see the HTML version of the page formatted with
my stylesheet.

BTW, I'll also check whether Mozilla prefers text/plain or text/css when
following a <link rel="stylesheet">
The text/plain page is displayed by the 2000-05-02-15-M16 nightly binary on 
WinNT; on the other hand it is also displayed by NN 4.72 and IE5 on WinNT.

Tim, what browsers have you seen correctly fetch the text/html page?
Also, 2000022916 is rather old now; you can download an M15 binary for
Linux or a more recent nightly binary from http://www.mozilla.org/binaries.html
-- knowing how this worked with a current build on Linux would be useful.

Not sure if HTTP 1.1 content negotiation work is finished.

The headers sent to the viewer at http://www.delorie.com/web/headers.html are:

HTTP/1.1 200 OK
Date: Wed, 03 May 2000 18:03:38 GMT
Server: Apache/1.3.6 (Unix) PHP/3.0.9
Content-Location: oblique.txt.en
Vary: negotiate, accept, accept-charset, accept-encoding
TCN: choice
Last-Modified: Wed, 03 May 2000 12:20:51 GMT
ETag: "197861-13b8-391019a3;39102b1f"
Accept-Ranges: bytes
Content-Length: 5048
Connection: close
Content-Type: text/plain
Content-Language: en
Expires: Wed, 03 May 2000 18:03:38 GMT

Not sure if that viewer attempts content negotiation. In any case, Mozilla
*will* display what it's sent according to the accompanying content type
in the header.
 This displays as plain text for me with a Linux CVS build from
May 3rd.
Lynx (Lynx/2.8.2rel.1 libwww-FM/2.14) prefers text/html to text/plain.

I suppose that really this preference ought to be user configurable.
NS4.x and Mozilla 2000-06-05-08 for Linux both get the text version of the page.
 The page seems to be using server-driven content negotiation, in which the
server uses the value of the "Accept" request header to determine the format in
which to return the text.

Mozilla 2000-06-05-08 for Linux sends the following Accept header:

Accept: */*

NS4.x on my machine sends this:

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*

Both headers are conformant to the HTTP 1.1 standard:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1

And agent-driven (i.e. Mozilla-initiated) content negotiation is not defined in
the standard:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html

Therefore this is not a bug.  Still, it would seem that the default behavior of
Mozilla should be to prefer HTML pages over text pages, for example with an
Accept header like this example from the RFC (first HTML page noted above):

Accept: text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c

As Tim Bannister noted, it seems like this would be a valuable preference to be
settable for folks with visual disabilities, but that is a separate RFE.  This
RFE is about Mozilla's default setting, and it is a valid RFE, so I'm rewording
the summary, changing severity to "enhancement," and confirming the bug as "New".

Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: prefers text/plain to text/html → RFE: prefer text/html over text/plain content
Target Milestone: --- → Future
Adding myself to CC as interested party for Accept header's fate
Setting platform == ALL
OS: Linux → All
Hardware: PC → All
Blocks: 61682
mass move, v2.
qa to me.
QA Contact: tever → benc
Came across this bug while looking for something completely different, but
here's more recent data points since the last comment was 15 months ago. 
Mozilla's Accept header seems to have been changed(?) in the meantime.

With Moz1.1b (2002072204) on WinXP, I get the text/html version.
With IE6.0, I get the text/plain version.
With Lynx2.8.4rel1 libwww-FM 2.14 on Solaris, I get the text/plain version.

Below are the dumped headers from Lynx (I don't know how to get the equivalent
for Moz or IE):

--begin lynx headers--
HTTP/1.1 200 OK
Date: Sun, 11 Aug 2002 15:10:34 GMT
Server: Apache/1.3.26 (Unix) PHP/4.0.6
Content-Location: oblique.txt.gz.en
Vary: negotiate,accept,accept-charset,accept-encoding
TCN: choice
X-Powered-by: Steam
Cache-Control: max-age=259200
Expires: Wed, 14 Aug 2002 15:10:34 GMT
Last-Modified: Thu, 04 May 2000 13:47:21 GMT
ETag: "64c070-86d-39117f69;3d45917c"
Accept-Ranges: bytes
Content-Length: 2157
Content-MD5: vfKgYqdIkyXh2xtIpKoxXw==
Connection: close
Content-Type: text/plain; charset=iso-8859-1
Content-Encoding: gzip
Content-Language: en
--end lynx headers--

These are the headers from the viewer at http://www.delorie.com/web/headers.html
--begin http header viewer headers--
HTTP/1.1 200 OK
Date: Sun, 11 Aug 2002 15:27:02 GMT
Server: Apache/1.3.26 (Unix) PHP/4.0.6
Content-Location: oblique.txt.en
Vary: negotiate,accept,accept-charset,accept-encoding
TCN: choice
X-Powered-by: Steam
Cache-Control: max-age=259200
Expires: Wed, 14 Aug 2002 15:27:02 GMT
Last-Modified: Thu, 04 May 2000 13:47:02 GMT
ETag: "64c066-1368-39117f56;3d45917c"
Accept-Ranges: bytes
Content-Length: 4968
Content-MD5: tgJWJnLeEVszs/VvHKfk1g==
Connection: close
Content-Type: text/plain; charset=iso-8859-1
Content-Language: en
--end header viewer headers--

Hope this helps.
-> http
Assignee: gagan → darin
Component: Networking → Networking: HTTP
QA Contact: benc → tever
RESOLVED/WFM

I'm behind on all the HTTP bugs I inherited this year, but I just checked this
w/ Camino 0.7 and Mozilla 1.4a/Mach-O, and we pull the text/HTML now.

We have had many changes to the accepts line since this bug was filed, and I'm
going to add this to the Accept: testing of my testing re-write.

If there are linux or windows users who can do quick look at the other
platforms, that would be great.
Status: NEW → RESOLVED
Closed: 21 years ago
QA Contact: tever → httpqa
Resolution: --- → WORKSFORME
Whiteboard: checkwin, checklinux
VERIFIED: Mozilla 1.4a, Win 98
Whiteboard: checkwin, checklinux → , checklinux
VERIFIED/WFM: Mozilla 1.4b
Status: RESOLVED → VERIFIED
Whiteboard: , checklinux
You need to log in before you can comment on or make changes to this bug.