tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
Date Fri, 17 Dec 2004 20:15:54 GMT
Bill Barker wrote:
>>  Remove duplicating uri because map_uri now properly reverts the
>>  changes made when jsessionid is found.
>>
> 
> This is a very big -1.  map_uri_to_worker is going to modify the uri that
> gets passed in, so it absolutely *must* be duped.
> 

Yes, but it will revert the changes made.

It's like:

void test(char *str)
{
    char save = str[2];
    str[2] = '\0';
    ...
    str[2] = save;
}


char some_string[] = "abcd";
test(some_string);

After the call it will still be like before.
Since the call to 'test(some_string)' is assured to be thread safe,
why dupping that string and then releasing it after the call?

Mladen.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message