How can I change the Content-Type of Perl-CGI scripts?

J

Jürgen Exner

Thomas said:
How can I change the Content-Type of CGI scripts?

Just a very wild guess: maybe by changing the parameter(s) of the header()
method?

jue
 
R

Ron Bergin

Hi.

Working with Apache 2.0 (on a customer's server and on my own server),
I've got a '500 Internal Server Error' with a CGI application. When
accessing 'http://customer_machine/test.cgi', Firefox tries to
download the error webpage.

But when accessing 'http://my_own_machine/test.cgi', Firefox shows the
HTML error webpage.

Analyzing headers

---------------------------------------http://customer_machine/test.cgi
HTTP/1.1 500 Internal Server Error
Content-Type: application/x-cgi
----------------------------------------

--------------------------------------http://my_own_machine/test.cgi
HTTP/1.1 500 Internal Server Error
Content-Type: text/html; charset=iso-8859-1

Well, that depends on whether you're referring to the headers your cgi
script outputs or the headers of the web server's error page that was
returned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top