Apache seach and replace Response Header

This is a discussion on Apache seach and replace Response Header within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello Group, I want to change a cookie path which is created by a cgi script. The script is encoded ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2005
Manuel Blechschmidt
 
Posts: n/a
Default Apache seach and replace Response Header

Hello Group,
I want to change a cookie path which is created by a cgi script. The
script is encoded and I cant change it. The URL in which way the script
is opened is rewritten, so the cookie path is wrong.
I just want to change the cookie path but I could not find how to read
from the header.
I need the environment Variable for response cookies.
I could also write a little hack for mod_headers to do this little task
but a default way would be better.


SetEnvIf Cookies ".*SessionID=(.*)" SessionID=$1
^^^^^ This only works with RequestHeaders
Header set Set-Cookie "SessionID=%{SessionID}e; Version=1; Path=/"
Header append Set-Cookie "Currency=EUR; Version=1; Path=/"

Greetings
Manuel
  #2 (permalink)  
Old 04-20-2005
Manuel Blechschmidt
 
Posts: n/a
Default Re: Apache seach and replace Response Header

Manuel Blechschmidt wrote:
> Hello Group,
> I want to change a cookie path which is created by a cgi script. The
> script is encoded and I cant change it. The URL in which way the script
> is opened is rewritten, so the cookie path is wrong.
> I just want to change the cookie path but I could not find how to read
> from the header.
> I need the environment Variable for response cookies.
> I could also write a little hack for mod_headers to do this little task
> but a default way would be better.


I solved the problem by hacking the mod_headers script.

>
>
> SetEnvIf Cookies ".*SessionID=(.*)" SessionID=$1
> ^^^^^ This only works with RequestHeaders
> Header set Set-Cookie "SessionID=%{SessionID}e; Version=1; Path=/"
> Header append Set-Cookie "Currency=EUR; Version=1; Path=/"
>
> Greetings
> Manuel

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:21 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0