httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <sor...@gmail.com>
Subject adding and editing response headers in conf
Date Thu, 16 Jun 2011 15:46:16 GMT
Hello,

I have a content generator that sets a cookie on a domain. I know the
cookie name and the domain name, they never change. However the cookie
value and expiration time vary. I would like to add the cookie with
same name and value, and optionally the same expiration time to a
second domain. Is there a way to do it just by configuring apache and
its standard modules? I do not want to _edit_ the Set-Cookie header. I
want to _add_ a second Set-Cookie header that is identical to the
first with the exception of the domain.

Here's an example:

The content generator gives the response

Set-Cookie: cookie_name=cookie_value; domain=host.domain.net;
expires=Mon, 20 Jun 2011 10:00:00 GMT

I want the response

Set-Cookie: cookie_name=cookie_value; domain=host.domain.net;
expires=Mon, 20 Jun 2011 10:00:00 GMT
Set-Cookie: cookie_name=cookie_value; domain=.domain.net; expires=Mon,
20 Jun 2011 10:00:00 GMT

Can I get this response just by changing the configuration of apache?

"Header edit cookie_name(.*)domain=[^;]+(.*)
cookie_name$1domain=.domain.net$2" does not help as it only moves the
cookie from one domain to the other and I want it copied, not moved.


Thank you,
Sorin

Mime
View raw message