httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Holthaus - Orange XL" <i...@orangexl.com>
Subject Re: mod_usertrack bugfix patch
Date Tue, 25 Feb 2003 22:27:11 GMT
There's still a small flaw here. Semicolons or comma's between "" should be
escaped.

----- Original Message -----
From: "Manni Wood" <mwood@digitas.com>
To: <dev@httpd.apache.org>
Sent: Tuesday, February 25, 2003 11:13 PM
Subject: RE: mod_usertrack bugfix patch


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 mwood@digitas.com

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


-----Original Message-----
From: Cliff Woolley [mailto:jwoolley@virginia.edu]
Sent: Tuesday, February 25, 2003 5:00 PM
To: dev@httpd.apache.org
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




Mime
View raw message