Hi, I'm developing an application (in Perl) that writes HTML code to an .htm file and later provides links to these HTML pages. Heres the question: when I write "Content-type: text/html \n\n" to the first line of the new HTML page and then try to display this page it shows this header as text in the page (in NS). Does anyone know how I can fix this from showing? The two newline characters are there because a HTTP header supposedly needs a line separating it from the HTML code below. Any help would be welcomed. Thanks. Rob
It's been a while since I have done Perl/CGI work but you may want to ensure that only the last header has the TWO newline characters. If a header before Content-type ends with two new lines it would cause what you are seeing... the double new lines are used to say "hey I am done, no more headers here". Hope this helps.
- Chris Stehno, SCPJ
posted 17 years ago
Thanks for the reply Chris. Yeah I've read about HTTP header "sensitivity" on a page but the problem I'm having is that it still prints it. Any other ideas behind why it is happening? It only happens on some of the pages too which would seem to suggest that spacing is the problem but it doesn't seem to be. Thanks again for the reply. Rob
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!