jam3s has asked for the wisdom of the Perl Monks concerning the following question:
Hello All I am having problems with the wrong content-type being sent in the HTTP Header as "Content-Type: text/plain". I have tried various different sample scripts such the hellworld one listed below:
When i preview the script in a browser I can see that the content-type is being added to the body of the page. I have pasted the packet capatured#!/usr/local/bin/perl # hello.pl -- my first perl script! print "Content-type: text/html\n\n"; print "Hello, world!\n";
I think this is probabily a configuration settings gone wrong, I am using perl v5.8.8 on Centos 5 with mod_perl. I am also trying to use the rss2cicsco script (found here http://dontpokebadgers.com/RSS2Cisco/) and getting the same results with each page having the content-type being added to the body of the http packet. THanks for any help JamesHTTP/1.1 200 OK Date: Thu, 15 Dec 2011 14:42:52 GMT Server: Apache/2.2.3 (CentOS) Connection: close Transfer-Encoding: chunked Content-Type: text/plain --------- HTTP Content Content-type: text/html Hello, world! ---------- HTTP Content
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl keeps sending wrong content-type
by Anonymous Monk on Dec 15, 2011 at 15:07 UTC | |
by jam3s (Initiate) on Dec 15, 2011 at 16:20 UTC |