You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by André Malo <nd...@perlig.de> on 2009/03/12 23:41:11 UTC

Re: Misleading example in Apache 2 doc (fix)

* Jose Kahan wrote:

[adding docs@]

> I didn't do my homework completely. According to
> RFC 2910, Cookie tokens may be separated by
> white space. The correct regular expression is:
>
> [[
>  SetEnvIf Cookie "language\s*=\s*([a-z|A-Z][a-z|A-Z|-]+)"
> prefer-language=$1 ]]

Also, why are you allowing pipe characters within the language spec? ;-)

How about simply:

language\s*=\s*([a-zA-Z-]+)

?

Maybe

language\s*=\s*([^;,\s]+)

is even better (more flexible). dunno.

nd
-- 
my @japh = (sub{q~Just~},sub{q~Another~},sub{q~Perl~},sub{q~Hacker~});
my $japh = q[sub japh { }]; print join       #########################
 [ $japh =~ /{(.)}/] -> [0] => map $_ -> ()  #            André Malo #
=> @japh;                                    # http://pub.perlig.de/ #

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: Misleading example in Apache 2 doc (fix)

Posted by Jose Kahan <jo...@w3.org>.
Hi André,

> language\s*=\s*([^;,\s]+)

Your expression works well and is simpler than mine.

+1 to update the doc with it instead of my proposal.

Thanks :)

-jose