Why is "Content-Type: text/html" at the top?

When I run my application straight from the browser with "http://127.0.0.1/webapp.cgi" then I do NOT see the line:

Content-Type: text/html; charset=ISO-8859-1

visibly printed at the top of the page. Which should be the case.

Case2: When I run the same application using OptiPerl in either external or internal browser mode I get "Content-Type: text/html; charset=ISO-8859-1" *visibly* printed at the top of the page. It runs correctly in either instance. I am wondering, therefore, if OptiPerl is inserting the "print header;" statement on its own?

Answer:
When you have menu item "Server / internal server" enabled & "Server / run with server" enabled then this line is not seen because the browser uses it to understand what kind of content to display, and displays the rest of the lines under it.

However when "run with server" is NOT enabled, this is like just running the script from the console, and all the output is just sent to the window of optiperl.

In any case optiperl itself does not have anything to do with this.

15.07.2003. 17:51

This article hasn't been commented yet.

Write a comment

:

:

:


5 + 1 =