Because you're passing the url of the page the user requested when you mean to redirect to the login page.
Maybe $cgi->url(-base => 1) . '/login.html'?
In reply to Re^3: 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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |