lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV text/html;q=0.000


From: Klaus Weide
Subject: Re: LYNX-DEV text/html;q=0.000
Date: Sun, 1 Dec 1996 22:13:32 -0600 (CST)

On Mon, 2 Dec 1996, Rob Hartill wrote:

> Klaus Weide wrote:
> 
> >On Sun, 1 Dec 1996, Rob Hartill wrote:
> >
> >> Hi,
> >> 
> >> why do so many Lynx users have it set to send "text/html;q=0.000" ?
> >
> >Ah, have they?  This is the first time I hear about that.
> 
> I've seen ~5 in as many days. Always Lynx.
> 
> One location found that they'd send that string with Lynx 2.6 but not 2.5

>[...] 
> my 2.6 behaves.

So do mine :)
 
> > - Lynx does it by mistake a.k.a. bug
> 
> possible. It might be pulling in extra Accept info from other source
> on the user system ?
[...] 
> I think 2.6 is perhaps grabbing more user info from somewhere.

The places from where it "grabs" info about media types:

(1) some are hardwired in src/HTInit.c (and some of those depend on whether
   Lynx is running under X, i.e. DISPLAY variable set at startup, or not)
(2) the lynx.cfg file
(3) a global (system wide) mailcap file 
(4) a personal .mailcap file
The names for the last two can be configured in lynx.cfg or userdefs.h.

Lynx internally constructs a list of all media types that it knows about.
Actually, to be more exact, a list of possible conversions from one
media type to a target media type, where the target type most often
is an internal one like "www/present".  "converting" e.g. "text/html"
to "www/present" means parsing the HTML and presenting to the user.

Those conversion also have a quality factor defined - normally it is 1.0.

When constructing a HTTP request, Lynx walks through that list and
creates an Accept header from those entries that have a conversion to
"www/present".  Each entry in the Accept header will also have the ";q=..."
_IF_ the quality factor is < 1.0.  A catch-all "*/*;q=0.001" is appended 
at the end.

The quality factor stuff was added between Lynx2.5 and Lynx2.6.
It is not possible to specify one for viewers defined in lynx.cfg.
It is posssible to do it for viewers (helper apps) defined in one of
the mailcap files, and it is documented in the sample mailcap file
distributed with Lynx.

But now to the mystery: there is no way that a user could specify a
quality factor of 0.000 for text/html via one of the mailcap files.
First of all, Lynx tries to completely skip extries for text/plain and
text/html from those files.  There is also the following test:

                mc->quality = atof(eq);
                if (mc->quality < 0.001)
                    mc->quality = 0.001;

(This is both implemented in src/HTInit.c.)  Third, the header lines
you gave show that the media types with a bogus ";q=0.000" appended
are from the settings done internally, i.e. (1) from the (1)-(4) listed
above.

Here is one of those lines (from src/HTInit.c) that add an entry to the list:
 HTSetConversion("text/html", "www/present", HTMLPresent,    1.0, 0.0, 0.0, 0);
That one somehow gets a bogus ";q=0.000" setting in your examples.  But
the 1.0 is the argument setting the quality factor.  So, big mystery.

Do those client sites where Lynx2.6 emits such headers have something 
in common?  Platform or compiler etc.  
Is it the official Lynx2.6 they are using?

    Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]