groengoen has asked for the wisdom of the Perl Monks concerning the following question:
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI error: "Invalid header value contains a newline not followed by whitespace"
by Corion (Patriarch) on Oct 13, 2014 at 20:16 UTC | |
|
Re: CGI error: "Invalid header value contains a newline not followed by whitespace"
by GrandFather (Saint) on Oct 13, 2014 at 20:15 UTC | |
|
Re: CGI error: "Invalid header value contains a newline not followed by whitespace"
by toolic (Bishop) on Oct 13, 2014 at 20:16 UTC | |
|
Re: CGI error: "Invalid header value contains a newline not followed by whitespace"
by ikegami (Patriarch) on Oct 14, 2014 at 06:49 UTC | |
by groengoen (Initiate) on Oct 14, 2014 at 08:39 UTC | |
by ikegami (Patriarch) on Oct 14, 2014 at 14:24 UTC | |
by groengoen (Initiate) on Oct 14, 2014 at 16:29 UTC |