Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How can I change the Content-Type of Perl-CGI scripts?

Reply
Thread Tools

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

 
 
Thomas Armstrong
Guest
Posts: n/a
 
      11-12-2007

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
--------------------------------------

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

Thank you very much.

 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      11-12-2007
Thomas Armstrong wrote:
> 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


 
Reply With Quote
 
 
 
 
Ron Bergin
Guest
Posts: n/a
 
      11-12-2007
On Nov 12, 9:41 am, Thomas Armstrong <tarmstr...@gmail.com> wrote:
> 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
> --------------------------------------
>
> How can I change the Content-Type of CGI scripts?


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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How can the change of second window trigger change of first window xhe Javascript 1 02-09-2007 06:16 PM
Change the master GridView after detail change? Q. John Chen ASP .Net 0 11-15-2006 05:31 PM
Change the master GridView after detail change? Q. John Chen ASP .Net 0 11-15-2006 05:30 PM
A Paradise DNS address change? What change? There was no change. Tony Neville NZ Computing 7 09-22-2006 01:02 PM



Advertisments