You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@covalent.net> on 2001/12/30 05:51:03 UTC

Re: cvs commit: httpd-2.0/modules/mappers mod_negotiation.c

> wrowe       01/12/29 20:14:20
> 
>   Modified:    modules/mappers mod_negotiation.c
>   Log:
>     Introduce the ForceLanguagePriority options;
>   
>     Prefer will circumvent a Multiple Choices by electing the first matching
>     language from the LanaguagePriority list.
>   
>     Fallback will circumvent a None Acceptable by electing the first
>     language found from the LanaguagePriority list.
>   
>     This breaks [expectedly] the negotiation tests.  They need review.
>     My test results will be posted to dev.


Notice; this patch breaks an earlier [backwards-broken] behavior, which could
be reintroduced if folks care.  We once served the first listed accept-language
when no quality values were present.  The essential question is; do we trust the
user to list them in order, or do we trust the administrators' list of languages
as authoritative?

Another side issue that I notice; we should _REALLY_ be presenting MULTIPLE
CHOICES rather than serving the smallest file.  The smallest file -hack- is
exactly that, someone worthless for reasons debated on this list many times.
It's better for the site maintainer to observe that one of two files could 
be served, and do something about it (a better naming convention, or whatever!)
Do I hear any agreement?

Finally, the promised test is attached.  Notice that by default, the french
document is smaller than the english, so it wins [again, should have been an MC.]
[The choice of Arabic as my not-found case is in no way a slight!  We simply don't
have a translation of the manual in arabic {yet}, and it's a code I can remember.]

The test was constructed with a very simple config;

Alias /priority/none "c:/Apache2/manual"
<Location /priority/none>
ForceLanguagePriority None
</Location>

Alias /priority/pre "c:/Apache2/manual"
<Location /priority/pre>
ForceLanguagePriority Prefer
</Location>

Alias /priority/fall "c:/Apache2/manual"
<Location /priority/fall>
ForceLanguagePriority Fallback
</Location>

Alias /priority/prefall "c:/Apache2/manual"
<Location /priority/prefall>
ForceLanguagePriority Prefer Fallback
</Location>

The obvious next change is to the /errors config, I'm changing that now.

The ultimate resolution would be internal server Q values for languages, content
types, and other variables.  I'm not up to that in the next few months, if anyone 
else thinks that sounds like an interesting project (for themselves to hack), feel 
free to discuss.

Bill


Re: cvs commit: httpd-2.0/modules/mappers mod_negotiation.c

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Rodent of Unusual Size" <Ke...@Golux.Com>
Sent: Sunday, December 30, 2001 10:14 AM


> "William A. Rowe, Jr." wrote:
> > 
> > Another side issue that I notice; we should _REALLY_ be
> > presenting MULTIPLE CHOICES rather than serving the smallest
> > file.  The smallest file -hack- is exactly that, someone
> > worthless for reasons debated on this list many times.
> 
> If you are referring to the past behaviour that the size
> would be used as a tie-breaker if multiple documents
> matched and had equivalent quality, it is NOT a hack -- it
> is designed and intended behaviour.  And if you think
> the list has concluded multiple times that that is worthless,
> I think you are indulging your revisionism gene because you
> personally don't like it.  My recollection is quite different.

Clarifying [sorry] - it has been debated, multiple times, and several
folks agreed with the existing behavior [ergo, it's never been changed.]

With this change, now the admin has control over serving something
v.s. serving a list of options based on languages.  This is finer 
grained control we didn't offer before.  I believe it mitigates 
(but perhaps doesn't eliminate) the need for the size tweak.

> If the admin doesn't like that the smallest file is being
> sent, he needs to adjust his quality values.  Or we introduce
> a means of disabling this network-friendly heuristic; I'm
> not opposed to that.

How would the admin adjust his quality values?  We don't offer such
an option.  Sdding another ForceLanguagePriority-type option isn't
out of the question.  [I agree that server-side Q values are best - but 
I don't have the energy to introduce them right now.]  I'd almost like
to group all such options together, but ForceLanguagePriority is a bad
choice for such a directive's name, no?

Having hacked it a bit more, I believe some additional options, 
including Smallest [to consider the size] and other, similar options 
are probably worthwhile.  Does anyone see merit in offering the old 
behavior of indexing by the client's list of accept-language?  [Exclusive 
of the new Prefer option, since they need the same index store.]  Options
I played with include Accepted or Given, and I didn't like either name.

Bill




Re: cvs commit: httpd-2.0/modules/mappers mod_negotiation.c

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
"William A. Rowe, Jr." wrote:
> 
> Another side issue that I notice; we should _REALLY_ be
> presenting MULTIPLE CHOICES rather than serving the smallest
> file.  The smallest file -hack- is exactly that, someone
> worthless for reasons debated on this list many times.

If you are referring to the past behaviour that the size
would be used as a tie-breaker if multiple documents
matched and had equivalent quality, it is NOT a hack -- it
is designed and intended behaviour.  And if you think
the list has concluded multiple times that that is worthless,
I think you are indulging your revisionism gene because you
personally don't like it.  My recollection is quite different.

If the admin doesn't like that the smallest file is being
sent, he needs to adjust his quality values.  Or we introduce
a means of disabling this network-friendly heuristic; I'm
not opposed to that.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"