httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stéphane BERTHELOT <>
Subject [users@httpd] Mod usertrack Cookie while 3xx redirect
Date Fri, 11 Jul 2008 09:37:04 GMT
Hello everyone,

I've spent some time trying to figure out why my Usertrack cookies were 
not sent while doing a 3xx redirect.

I had the same problem with custom Headers set using the header command 
(everything in an .htaccess file)

To get the header I have to put the "always" condition so that they get 
Since I've had a look at mod_headers.c and mod_usertrack.c and it seems 
the redirection is using f->r->err_headers_out instead of f->r->headers 
_out (while f is ap_filter_t*)

So my question is, what is the best way to achieve what I want ? (put 
usertrack cookies while redirecting)
(I forgot to say that I don't want to use a script language like PHP for 
performance reasons)

1- Use some rewrite magic (internal redirect, proxy ?) to get the 
headers sent using for example a local redirect (which seems to add the 
headers), then a 3xx redirect (but I can't get them at that phase)
2- make a small patch to add a similar directive (CookieAlwaysSend ?) 
that also adds usertrack cookie header to f->r->err_headers_out (should 
I also add a error filter to the chain in that case ?)
3- use some other magic to get the internal current value of usertrack 
cookie in rewrite rules (getting the value of f->r->headers_out if it 
has already been filled by usertrack would be great) and then add the 
cookie manually

I've tried using the CO directive from mod_rewrite and those cookies are 
correctly added in 3xx redirects...

Maybe I'm completely mistaken and I should not put cookies in redirect 
responses or manually adding a simple "Location: URI" header instead of 
doing a 3xx redirect would do the trick but I'm not sure about Browser 
compatibility ...
If I'm mistaken it would be great to have some pointers to understand why.

Thanks in advance,


(Logo EmisFr)
*Stéphane BERTHELOT*
/Réseau : Sécurité et Serveurs , Développements métier et spécifiques/
10 rue Mazagran, 54000 NANCY, France
Tel/Fax.: +33.3 83 32 25 75

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message