You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Michael D. Berger" <m....@ieee.org> on 2005/05/21 04:29:34 UTC

[users@httpd] one cookie for all html

I would like to manage one cookie for all the
myriad files in my tree.  This would be easy if
the one cgi script in the root were called
irrespective of the contents of the GET.
Can this be done? How?
Thanks,
Mike.
--
Michael D. Berger
m.d.berger@ieee.org 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] one cookie for all html

Posted by "Michael D. Berger" <m....@ieee.org>.
> -----Original Message-----
> From: Michael D. Berger [mailto:m.d.berger@ieee.org] 
> Sent: Monday, May 23, 2005 10:25 PM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] one cookie for all html
> 
> 
> 
> 
> --
> Michael D. Berger
> m.d.berger@ieee.org 
> 
> > -----Original Message-----
> > From: Joshua Slive [mailto:jslive@gmail.com] 
> > Sent: Monday, May 23, 2005 9:33 PM
> > To: users@httpd.apache.org
> > Subject: Re: [users@httpd] one cookie for all html
> > 
> > 
> > On 5/23/05, Michael D. Berger <m....@ieee.org> wrote:
> > > Thanks for this information.  I read up on RewriteRule, and I
> > > now have it working in a preliminary way.  Any URI calls my one
> > > cgi. HOWEVER, I get a different cookie file name on the client
> > > for each URI.  I would like the same cookie file on the client
> > > for all URIs. Can this be done?  The client is IE 6.0.
> > 
> > Sounds like a problem with your cgi script.  It needs to 
> check if the
> > cookie exists in the client request before setting another one.
> > 
> > Joshua.
> I want to send the cookie whether or not one is returned.  If there is
> one, I want to replace it.  The Set-Cookie is trivial, and contains no
> path information.  If the client only calls the root, this 
> what happens.
> But if one of the subdirectories is called, the client gives 
> the cookie
> file another name.  Maybe I should try path=/ in the Set-Cookie?
> Tomorrow. Its bed time at UTC-0400.
> Thanks,
> Mike.
> 
path=/ indeed solves the problem, as a careful trading of the
rfc 2109 suggests.  I now get exactly one cookie rather than
several.
Mike.
--
Michael D. Berger
m.d.berger@ieee.org 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] one cookie for all html

Posted by "Michael D. Berger" <m....@ieee.org>.

--
Michael D. Berger
m.d.berger@ieee.org 

> -----Original Message-----
> From: Joshua Slive [mailto:jslive@gmail.com] 
> Sent: Monday, May 23, 2005 9:33 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] one cookie for all html
> 
> 
> On 5/23/05, Michael D. Berger <m....@ieee.org> wrote:
> > Thanks for this information.  I read up on RewriteRule, and I
> > now have it working in a preliminary way.  Any URI calls my one
> > cgi. HOWEVER, I get a different cookie file name on the client
> > for each URI.  I would like the same cookie file on the client
> > for all URIs. Can this be done?  The client is IE 6.0.
> 
> Sounds like a problem with your cgi script.  It needs to check if the
> cookie exists in the client request before setting another one.
> 
> Joshua.
I want to send the cookie whether or not one is returned.  If there is
one, I want to replace it.  The Set-Cookie is trivial, and contains no
path information.  If the client only calls the root, this what happens.
But if one of the subdirectories is called, the client gives the cookie
file another name.  Maybe I should try path=/ in the Set-Cookie?
Tomorrow. Its bed time at UTC-0400.
Thanks,
Mike.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] one cookie for all html

Posted by Joshua Slive <js...@gmail.com>.
On 5/23/05, Michael D. Berger <m....@ieee.org> wrote:
> Thanks for this information.  I read up on RewriteRule, and I
> now have it working in a preliminary way.  Any URI calls my one
> cgi. HOWEVER, I get a different cookie file name on the client
> for each URI.  I would like the same cookie file on the client
> for all URIs. Can this be done?  The client is IE 6.0.

Sounds like a problem with your cgi script.  It needs to check if the
cookie exists in the client request before setting another one.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] one cookie for all html

Posted by "Michael D. Berger" <m....@ieee.org>.
> -----Original Message-----
> From: Joshua Slive [mailto:jslive@gmail.com] 
> Sent: Sunday, May 22, 2005 12:01 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] one cookie for all html
> 
> 
> On 5/20/05, Michael D. Berger <m....@ieee.org> wrote:
> > I would like to manage one cookie for all the
> > myriad files in my tree.  This would be easy if
> > the one cgi script in the root were called
> > irrespective of the contents of the GET.
> > Can this be done? How?
> 
> This can be done with Action, ScriptAlias, or RewriteRule, depending
> on your needs.  (They increase with flexibility and complexity in that
> order.)
> 
> For example:
> ScriptAlias / /full/filesystem/path/to/cgiscript.cgi
> (Note this will hit .gif/.jpg/etc as well as html requests.)
> 
> Joshua.
> 

Thanks for this information.  I read up on RewriteRule, and I
now have it working in a preliminary way.  Any URI calls my one
cgi. HOWEVER, I get a different cookie file name on the client
for each URI.  I would like the same cookie file on the client
for all URIs. Can this be done?  The client is IE 6.0.
Thanks again for your help.
Mike.

--
Michael D. Berger
m.d.berger@ieee.org 






> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] one cookie for all html

Posted by Joshua Slive <js...@gmail.com>.
On 5/20/05, Michael D. Berger <m....@ieee.org> wrote:
> I would like to manage one cookie for all the
> myriad files in my tree.  This would be easy if
> the one cgi script in the root were called
> irrespective of the contents of the GET.
> Can this be done? How?

This can be done with Action, ScriptAlias, or RewriteRule, depending
on your needs.  (They increase with flexibility and complexity in that
order.)

For example:
ScriptAlias / /full/filesystem/path/to/cgiscript.cgi
(Note this will hit .gif/.jpg/etc as well as html requests.)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org