should bemy $cookie = $cookie1."\nSet-Cookie: $cookie2"."\nSet-Cookie: $cookie3 +\nSet-Cookie: $cookie4";
my $cookie = [ $cookie1, $cookie2, $cookie3, $cookie4 ];
Then we can clean up your code.
or evenmy @cookies; push @cookies, $cgi->cookie(-name => "login", -value => "", -expir +es => '-1d'); push @cookies, $cgi->cookie(-name => 'password', -value => "", -expir +es => '-1d'); push @cookies, $cgi->cookie(-name => 'id', -value => "", -expir +es => '-1d'); push @cookies, $cgi->cookie(-name => 'CGISESSID', -value => "", -expir +es => '-1d'); print $cgi->redirect( -cookie => \@cookies, -uri => $cgi->url(), );
my @cookies = map { $cgi->cookie(-name => $_ -value => "", -expires => + '-1d') } qw( login password id CGISESSID ); print $cgi->redirect( -cookie => \@cookies, -uri => $cgi->url(), );
In reply to Re: CGI error: "Invalid header value contains a newline not followed by whitespace"
by ikegami
in thread CGI error: "Invalid header value contains a newline not followed by whitespace"
by groengoen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |