httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <>
Subject proposed extension to mod_headers
Date Tue, 05 Jul 2011 13:26:30 GMT

Some while ago I've posted a messages in which I enquired if there is
a module that copies a slightly modified output header to a response.

In particular, I wanted to set the same cookie on two domains in the
same request. The content generator sets the cookie on one domain and
I wanted to copy the Set-Cookie header and to modify its domain field.

For example:

The content generator sets:

Set-Cookie: name=value;; expires=12000

and I want that the client gets:

Set-Cookie: name=value;; expires=12000
Set-Cookie: name=value;; expires=12000

I've developed a module that is similar to mod_headers. I've added a
directive called HeaderExt that would be used as shown below in order
to obtain the functionality shown in the example above.

HeaderExt [always|onsuccess] copyedit Set-Cookie
^name=(.*)domain=[^;]+(.*) name=$$2 [env=var]

The code is available here:

Thank you for your feedback.


View raw message