You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 1998/07/10 03:27:16 UTC

Protocol versus precedent..

During som anti-robot configuring in the last couple of days,
I discovered an inconsistency:

If a request header doesn't include a "User-Agent" field,

 - 'BrowserMatch "^$"' doesn't match, but
 - 'RewriteCond %{HTTP_USER_AGENT} "^$"' does.

So the question is, should a missing field be treated in a manner
identical to one with no value?  (Provided the latter's legal;
I haven't checked.)

It's essentially a one-line fix to mod_setenvif.c to make it
behave in the same manner as mod_rewrite.  I'm inclined to
say that's the appropriate action since there's no other way
BrowserMatch can be used to deal with a missing User-Agent
field.  But I'll defer to the protocol gurus.  There's currently
an inconsistency, so one or the other should be changed.

Roy?

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>