Cliff,

Interesting you should mention this. An older version of the patch I wrote (I've been 
working on the problem off an on for over a year) did what you said: loop over the 
delimiters and parse each name=value pair into an apache table. Then, I asked the 
apache table if the cookie was present. (These older patches are linked to from 
http://manniwood.net/mod_usertrack_patch.html, at the bottom of the page.)

What I could do is use the code I wrote to parse the cookie header into the apache 
table, but make two improvements:

1. Use both ';' and ',' as delimitors, and
2. Stop processing the cookie header as soon as I find the tracking cookie, and don't 
bother putting the cookies into an ap_table at all.

Does this sound like the best approach to you? It wouldn't take me very long to code.

-Manni

--------------------------------------------
Manni Wood, Programmer, Digitas
800 Boylston Street, Boston, MA, 02199
617 867 1881 [EMAIL PROTECTED]

"Most men would rather die than think. Many do."    --Bertrand Russell
 

-----Original Message-----
From: Cliff Woolley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 5:00 PM
To: [EMAIL PROTECTED]
Subject: RE: mod_usertrack bugfix patch


On Tue, 25 Feb 2003, Manni Wood wrote:

> So does this mean that you now agree that I should be using a regexp to
> find the cookie? I think that's what you mean.

I'm still unclear why this requires a full-blown regex.  Isn't all we
really need to do to loop over the delimiters (semicolon and comma),
remove whitespace, and then see if the next word (characters up to
whitespace or an equal) matches the cookie name using strcmp()?

--Cliff


Reply via email to