Subject: | getting header w/ <web:header name="Some-Header"/> does not work |
sub header ($;$) {
my $name = shift;
my $r = AxKit::Apache->request;
if (@_) { # <-- isn't false, when only the 'name' attribute is
# given to <web:header/>; (remaining element w/
# value undef in @_)
return $r->header_out($name, $_[0]);
}
else {
return $r->header_in($name);
}
}
One-line patch attached.
Subject: | WebUtils.pm.diff |
--- WebUtils.pm.orig 2006-06-08 13:51:05.000000000 +0200
+++ WebUtils.pm 2006-06-08 13:51:48.000000000 +0200
@@ -157,7 +157,7 @@
my $name = shift;
my $r = AxKit::Apache->request;
- if (@_) {
+ if ($_[0]) {
return $r->header_out($name, $_[0]);
}
else {