Life, SAP, Consulting, Programming, Coding, ASP.NET, Sharepoint, MVC, Javascript, PHP, WebDesign, CSS, HTML

Content-Type Error (CGI) : CGI program put all outputs in a tag <pre>

Today, I tried to write a CGI program which work with Apache Web server.

Every thing go well in Microsoft IE. But my default browser will display full output surrounded by a pre tag. I have check it again and again. Finally, I found that my Header was wrong. I wrote “Content Type: text/html\n\n” instead of the wright format :”Content-type:text/html\n\n”. So I got the error. Hope this tip will helpful for someone after me.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: