Re: Small patch for the "appsession" feature

From: Cyril Bonté <cyril.bonte#free.fr>
Date: Mon, 16 Nov 2009 22:52:04 +0100


Le lundi 16 novembre 2009 13:41:14, Willy Tarreau a écrit :
> On Mon, Nov 16, 2009 at 01:04:17PM +0100, Aleksandar Lazic wrote:
> (...)
> > >>app* delimiterstart (default ;)
> > >>app* delimiterstop (defautl =)
> > >
> > >I'm sorry, I don't understand what you mean. Could you give an example
> > >of configuration using this ?
> >
> > For example:
> >
> > if in the url the delimiter changes from ';' to ',' then you should
> > set the following
> >
> > appsession-option delimiterstart ,
> >
> > and the end point is not '=' it is ';' then you should set the
> > following
> >
> > appsession-option delimiterstop ;
> (...)

Yes, this was exactly why I first thought of adding options on several lines. Having all the options on the same like can quickly make the configuration difficult to read/debug. Imagine a line like :
"appsession PHPSESSID len 32 timeout 1h request-learn cookie-capture start-delimiters ?& stop-delimiters &" I found it not really user friendly... (well, my idea to split the line in several options looks not much better)

> (...)
> Also, if we have other special cases later, it might be easier to implement
> some methods specific to some servers than to have the user explicitly
> specify a number of complex arguments they won't always be able to figure
> out.
>
> For instance : appsession-mode weblogic
> (...)

I really like this idea. This would make the configuration simpler and the algorithm to parse the URL can be easily optimized for each mode.

Based on this idea, maybe we can stay with all the options on the same line (looks like the "server" configuration part). The most complex line would be :
"appsession PHPSESSID len 32 timeout 1h mode query-string request-learn cookie-capture"

And for now, I see 2 modes :
- path-parameters (the default)
- query-string (the one that made me look at the code :-) ) (and if needed "weblogic")

-- 
Cyril Bonté
Received on 2009/11/16 22:52

This archive was generated by hypermail 2.2.0 : 2009/11/16 23:00 CET