From: Nick C. <ni...@cl...> - 2002-11-13 09:22:34
|
Some of the scripts roll their own CGI headers with stuff like print <<END Content-type: text/html; charset=$charset END which gave one user a problem because his web server insisted on \015\012 CGI header line endings. The right way to get correct header line endings for the platform is with CGI.pm's header() function, but older versions of CGI.pm don't support the -charset option to header(), so we can't just put: print header('-type'=>'text/html', '-charset'=>$charset); and have it work back to 5.00404. I've tested print header('-type' => "text/html; charset=$charset"); in both 5.00404 and 5.008, and it works without warnings. I propose that we change any scripts that roll their own CGI headers over to this second way of doing it, and hope no future version of CGI.pm adds a warning for this type of abuse of -type. Thoughts ? -- Nick |