[Denver-pm] perl cgi-bin and Content Type?

Larry Leszczynski larryl at emailplus.org
Tue Nov 11 20:32:54 PST 2014


Hi Robert -

The HTTP spec says that lines should end with CR LF, and that you need a
blank line after the last header and before the body. So your first
example with two carriage returns is correct (except you should probably
use "\r\n\r\n" instead of "\n\n").  There must be something else going
on that is causing trouble with the style sheet info - can you post a
more complete example?

Larry

On Tue, Nov 11, 2014, at 08:34 PM, Robert L. Harris wrote:
>   I have a simple perl script which is supposed to run as a CGI to create
> some html output.  The start of the output looks like :
> 
> Content-Type: text/html; charset=ISO-8859-1
> 
> <HTML><HEAD>
> .
> .
> .
> 
> I use 2 print statements.
> 
>   print "Content-Type: text/html; charset=ISO-8859-1\n\n";
>   print "<HTML><HEAD>\n";
> 
> What I've noticed is that if I don't put the two carriage returns I get a
> 500 error.  If I put the two carriage returns I get output but it's not
> processing the stylesheet information which follows.  Anyone have any
> ideas
> or a POST example perl script which uses stylesheets I can pick apart?
> 
> Robert
> _______________________________________________
> Denver-pm mailing list
> Denver-pm at pm.org
> http://mail.pm.org/mailman/listinfo/denver-pm


More information about the Denver-pm mailing list