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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |