Hi,
I'm going to try and make a switch from PHP to Perl for my next web project. I've just been going through the basics and was wondering why there is the need to output an HTTP header line as the first line of output from a perl script. I run apache and it seems that a certain level of intelligence takes place before passing the data back to the client because Apache seems to cut out any duplicate HTTP headers, that is to say it appears that the ouput from Perl is not just added to the headers and sent without first being checked. For example, if the first line of my Perl output is to simply output "\r\n", that works fine and a content-type header is added automatically by Apache as I would expect. If I output a Content-Type header in Perl, Apache doesn't then try and add this header twice. Therefore, I would have though that it would be simple enough for Apache to add the extra line break needed before sending back the data. I am hoping someone can help me understand how it is all formed as It always helps me to know why things behave how they do. Hope that made some sense.
regards
cyril
In reply to cgi theory by cyril
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |