Re: appsession fix

From: Aleksandar Lazic <al-haproxy#none.at>
Date: Sat, 16 Feb 2008 00:12:30 +0100


On Fre 15.02.2008 23:54, Willy Tarreau wrote:
>On Thu, Feb 14, 2008 at 02:46:44PM -0700, Ryan Warnick wrote:
>> Sounds good. How about that first change that I proposed (the bug
>> fix)?
>
>I've just checked the code, and while I think you're right, I think
>that there are two other places with exactly similar code which need
>this patch too :
>
> - manage_client_side_cookies(), around line 4098.

In this function the code is similar:

###

    3971                                         /* only do insert, if lookup fails */
    3972                                         asession_temp = appsession_hash_lookup(&(t->be->htbl_proxy), asession_temp->sessid);
    3973                                         if (asession_temp == NULL) {
###

> - manage_server_side_cookies(), around line 4564.
> - and yours, get_srv_from_appsession() around line 4734.
>
>What do you think ? Aleks, do you agree with me ?

For the other two yes, but isn't it the same?!

get_srv_from_appsession()

    4609         /* only do insert, if lookup fails */
    4610         if (appsession_hash_lookup(&(t->be->htbl_proxy), asession_temp->sessid) == NULL) {

in meta-code, as I understand it.

####
$VAR = RETVAL_OF_FUNC;
if($VAL ...)

if(RETVAL_OF_FUNC ..

####

What I think is that we should have one method, algorithm which checks the (apsession-)?cookies.

What I mean is that the both, manage_(server|client)_side_cookies, functios make mostly the same, please correct me if I'am wrong.

Sorry that I can't code for the moment but I'am to busy ;-((

Cheers

Aleks Received on 2008/02/16 00:12

This archive was generated by hypermail 2.2.0 : 2008/02/16 00:16 CET