Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Content-type: text/html

by vinoth.ree (Prior)
on Mar 14, 2013 at 10:43 UTC ( #1023454=note: print w/ replies, xml ) Need Help??


in reply to Content-type: text/html

The first line of our CGI script must be "Content-Type: text/html" and the print statement must have 2 \n characters:

One to terminate the current line and the second to produce the require blank line between CGI header and data.

Update: Sorry


Comment on Re: Content-type: text/html
Replies are listed 'Best First'.
Re^2: Content-type: text/html
by marto (Bishop) on Mar 14, 2013 at 10:46 UTC

    This has nothing to do with their problem. If they remove line printing the header, which is what they are reporting, they get an error. Use a proper framework for dealing with CGI (be it CGI or a 'modern' web framework), stop worrying about manually printing headers.

    Update: Also, printing the header does not have to be the first line of code.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1023454]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2015-08-28 09:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (335 votes), past polls