projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bbd63a
)
Set X-Set-Cookie only when there is a cookie.
author
Mike Taylor
<mike@indexdata.com>
Wed, 26 Jun 2013 12:55:17 +0000
(14:55 +0200)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 26 Jun 2013 12:55:17 +0000
(14:55 +0200)
etc/mod_perl/MyApache2/CopyCookie.pm
patch
|
blob
|
history
diff --git
a/etc/mod_perl/MyApache2/CopyCookie.pm
b/etc/mod_perl/MyApache2/CopyCookie.pm
index
3dbade1
..
64089a2
100644
(file)
--- a/
etc/mod_perl/MyApache2/CopyCookie.pm
+++ b/
etc/mod_perl/MyApache2/CopyCookie.pm
@@
-16,7
+16,9
@@
sub handler {
# header other than the magic "Cookie" that clients can't read.
my $ho = $f->r->headers_out;
my $cookie = $ho->get('Set-Cookie');
- $ho->set('X-Set-Cookie', $cookie);
+ if (defined $cookie && $cookie ne "") {
+ $ho->set('X-Set-Cookie', $cookie);
+ }
# If the client sent an existing cookie as X-Cookie, but didn't
# set Cookie, copy the former to the latter.