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

You build a header value that contains newlines, and these newlines are not immediately followed by whitespace. This is what CGI.pm complains about, as doing so is usually an error.

Your code seems to try to abuse that function to set multiple cookies. Maybe you want to ask how to set multiple cookies using CGI.pm instead? Unsurprisingly, searching CGI for "multiple cookies" gives a ready result. Maybe you want to try that?

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