httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject Re: Negotiation updates, and transparent neg.
Date Wed, 21 Aug 1996 04:25:27 GMT
On Tue, 20 Aug 1996, Roy T. Fielding wrote:

> Ummm, I was thinking last night about the change to */* handling,
> and I think we may have done it wrong.  As I recall, Netscape sends
>     Accept: */*, image/gif, image/jpeg, image/xbm

Netscape 1.0 and 1.1 send:

Accept: image/gif
Accept: image/x-xbitmap
Accept: image/jpeg
Accept: */*

Netscape 2.0 and 3.0 send:

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

> on a normal request because their *&*%^$%#$^ program is too lazy
> to do a merge.

What do you mean by this? A merge of what?

> The problem is that if a given resource is available as both
> text/html and image/jpeg (as might be the case for a magazine cover),
> then inventing a low q value for */* means that the user will get
> the image/jpeg version even if the text/html has a much higher qs.
> I'm sure that RST mentioned this to me last year at MIT.

Even so, this case is far less likely than the case of, for example,
image/jpeg and image/png, with the PNG having a higher qs value than the
JPEG. See, Netscape can handle HTML, and it can handle JPEG. It can't
handle PNG. I'd rather see a scheme that gives a browser *something*, of
possibly lesser quality, that it can handle inline, instead of giving it
something of high quality that it can only save to disk.

> I think the only solution that would work is an "all things being equal"
> tie-breaker function which only gets called when */* appears without
> a q-value.  Whatcha think?

It does this already (as of 1.1). It doesn't help if the qs-values are
different. Math time:

We have two variants, image/jpeg;qs=0.2, image/png;qs=0.9

Netscape can handle JPEG, not PNG, sends:

Accept: ... image/jpeg,... */*

If we treat them all as q=1.0 (as the spec says), then the total quality
of the JPEG is 0.2*1.0, or 0.2, and the total quality of the PNG is
0.9*1.0, or 0.9. The PNG has a higher quality, so we send it. Hmm.

On the other hand, with my patch (current in the 1.2-dev code), the
"image/jpeg" is treated as q=1.0, and the "*/*" is treated as q=0.01. The
JPEG now gets a quality of 0.2*1.0, or 0.2, and the PNG gets a quality of
0.9*0.01, or 0.009, which is less than 0.2, so we send the JPEG, and
Netscape (and especially the user) is happy.

Makes sense to me.

-- Alexei Kosut <>            The Apache HTTP Server

View raw message