in reply to Re^6: CGI error: "Invalid header value contains a newline not followed by whitespace"
in thread CGI error: "Invalid header value contains a newline not followed by whitespace"

Then you're probably doing something else wrong. Go to http://buzzword.org.uk/2012/ and click on redir-cookie.cgi. It will redirect you. Now check your browser's cookie jar.

The source for redir-cookie.cgi is:

#!/usr/bin/perl use CGI; my $cgi = CGI->new; print $cgi->redirect( -uri => "http://buzzword.org.uk/", -cookie => [ $cgi->cookie(-name=>'foobar', -value=>123) ], );

I've tested this in Opera 12, Firefox 3.6.9, Lynx 2.8.6rel.4 and Internet Explorer 8.0. It works.

  • Comment on Re^7: CGI error: "Invalid header value contains a newline not followed by whitespace"
  • Download Code