Re: Using info in response headers to create new header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 27, 2012 at 7:13 AM, <kharper2@xxxxxxxxxxxxxxx> wrote:

Hello all,

I've been researching mod_headers all day trying to figure out how to do
this... time to ask the group.

I would like to be able to use the information in a Set-Cookie header to
determine if I should set an additional cookie.  For example, if Set-Cookie
"mycookie=abc123-happy" comes through as a response header, I want to
create another Set-Cookie header with just the "happy" portion of the
original Set-Cookie header.

I know mod_headers can edit an existing header, but I need the original
header (Set-Cookie "mycookie") to stay in tact, while I create another
Set-Cookie header before sending it down the wire.

Thanks for any input or ideas.


Kyle Harper

This communication and any attachments are confidential, protected by Communications Privacy Act 18 USCS § 2510, solely for the use of the intended recipient, and may contain legally privileged material. If you are not the intended recipient, please return or destroy it immediately. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



Try this untested: 

SetEnvIf Set-Cookie mycookie=abc123-happy HAVE_happy
Header add Set-Cookie "mycookie2=happy" env=HAVE_happy

This is if the value of the cookie is static (always the same). I'm not sure how is this going to work in case you need dynamic one which will need use of regular _expression_. Then you can't set the variable to a value of the regular _expression_ which means you will need to use CGI approach.



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux