You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@liege.ICS.UCI.EDU> on 1996/07/19 12:06:51 UTC

Re: mod_negotiation gif/jpeg issues

> A friend using Apache 1.1 was telling me today about a site he just
> created that had every image available as GIF and JPG.  He wanted to make
> sure that Netscape and others got JPEGs and others got GIFs.  Without a
> VAR map Apache always sent the GIF so he had to write a program to create
> the hundreds of VAR maps that all said basically the same thing (*1)
> 
> He thought a good solution would be to specify a default type map that
> would apply when a map isn't available and is built from a directory
> listing instead (so he could say treat all "image/jpeg" as qs=0.6 and
> "image/gif" as qs=0.5)
> 
> Does this sound like a useful patch to anyone else?

No, in fact I would veto its addition to the source.  The qs value
is the quality of the image as perceived by a human being; assigning
it a default for all images of a certain type would be a direct
violation of the protocol and greatly hinder true content negotiation.

Likewise, sending a qs parameter in Content-Type for a media type that
would not expect to have a qs parameter is a violation of the semantics
of the protocol.

Netscape sends out the wrong Accept list.  We all know this.  The proper
response is to make the "what to do if all other things are equal" function
be dependent on user agent.  Somebody may be able to come up with an
easy-to-configure way of setting that, but the most direct route is
to patch the negotiation algorithm.

.......Roy

Re: mod_negotiation gif/jpeg issues

Posted by Brian Behlendorf <br...@organic.com>.
On Fri, 19 Jul 1996, Roy T. Fielding wrote:
> > A friend using Apache 1.1 was telling me today about a site he just
> > created that had every image available as GIF and JPG.  He wanted to make
> > sure that Netscape and others got JPEGs and others got GIFs.  Without a
> > VAR map Apache always sent the GIF so he had to write a program to create
> > the hundreds of VAR maps that all said basically the same thing (*1)
> > 
> > He thought a good solution would be to specify a default type map that
> > would apply when a map isn't available and is built from a directory
> > listing instead (so he could say treat all "image/jpeg" as qs=0.6 and
> > "image/gif" as qs=0.5)
> > 
> > Does this sound like a useful patch to anyone else?
> 
> No, in fact I would veto its addition to the source.  The qs value
> is the quality of the image as perceived by a human being; assigning
> it a default for all images of a certain type would be a direct
> violation of the protocol and greatly hinder true content negotiation.

What is semantically or morally so bad with the statement that "in
general, all GIF's on my site are slightly less attractive than their JPG
brethren"?  Clearly with the failure of clients to set q values, something
like this is necessary, but even if all clients and servers implemented
negotiation properly, the server author should have the right to set
global qs values, which definitely should be overridable on a per-file
basis.

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Re: mod_negotiation gif/jpeg issues

Posted by Mark J Cox <ma...@ukweb.com>.
> > He thought a good solution would be to specify a default type map that
> > would apply when a map isn't available and is built from a directory
> > listing instead (so he could say treat all "image/jpeg" as qs=0.6 and
> > "image/gif" as qs=0.5)
>
> No, in fact I would veto its addition to the source.  The qs value
> is the quality of the image as perceived by a human being; assigning
> it a default for all images of a certain type would be a direct
> violation of the protocol and greatly hinder true content negotiation.

All the user wanted to do was to replace 300 .VAR files that all said
"here is a gif as qs=0.5 and here is a jpeg at qs=0.6" with one .VAR file
that applied _throughout_ his server.

> The proper response is to make the "what to do if all other things are
> equal" function be dependent on user agent.

Agreed.  I really wanted to avoid another user agent dependant thing
(specially since you can't trust user agents).

[Aside: MSIE 3.0b2 sends the very useful "Accept: */*" and also three
extra headers that give your screen size, bits per pixel, CPU type and
operating system "ua_cpu","ua_disp","ua_os" blurgh!]

Mark