Content-type needs to be printed because you may want to output things other than text/html. You could also do application/pdf or image/jpeg.
Apache needs that blank line because it has no good way of otherwise knowing when you're done printing headers and want to send the actual content. There could be more headers to send other than Content-type.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
In reply to Re: cgi theory
by hardburn
in thread cgi theory
by cyril
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |