Re: Question on URL based load balancing

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 8 Mar 2010 11:46:39 +0100


On Mon, Mar 08, 2010 at 09:07:28PM +1030, Andrew Commons wrote:
> I would reinforce the point Willy is making regarding syntax. URLs contain
> characters that are part of the regex metacharacter set. It is very easy to
> overlook this and resulting expressions will work...most of the time.
>
> I think an example can be found in the documentation. There is a section
> containing an example "Example: move the login URL only to HTTPS.". The
> example contains the following regex definition:
>
> acl uid_given url_reg /login?userid=[^&]+
>
> I suspect the intent is more accurately represented by:
>
> acl uid_given url_reg /login[?]userid=[^&]+
>
> This assumes that POSIX extended regex are being used. There is only one
> reference I've come across in the documentation that actually specifies
> which of the several regex variants is being used. Perhaps Willy can
> confirm?

Yes Andrew, you're right, those are extended regex only.

Regards,
Willy Received on 2010/03/08 11:46

This archive was generated by hypermail 2.2.0 : 2010/03/08 12:00 CET