This is the same title as a previous question but the error occurs in different circumstances. I am a complete newby with CGI and PERL and was just looking to debug a CGI script.
This is to log out from the script and redirect to the previous screen.###################################################################### +############################################### # LOGOUT ###################################################################### +############################################### sub logout { my ($cgi) = @_; my $cookie1 = $cgi->cookie(-name => "login", -value => "", -expires => '-1d'); my $cookie2 = $cgi->cookie(-name => 'password', -value => "", -expires => '-1d'); my $cookie3 = $cgi->cookie(-name => 'id', -value => "", -expires => '-1d'); my $cookie4 = $cgi->cookie(-name => 'CGISESSID', -value => "", -expires => '-1d'); my $cookie = $cookie1."\nSet-Cookie: $cookie2"."\nSet-Cookie: $cooki +e3\nSet-Cookie: $cookie4"; print $cgi->redirect(-cookie => $cookie, -uri => "$PROTOCOL://$ENV{HTTP_HOST}$ENV{SCR +IPT_NAME}" ); return; }
In reply to CGI error: "Invalid header value contains a newline not followed by whitespace" by groengoen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |