httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Robert D." <RDNel...@Mail.Donaldson.com>
Subject RE: [users@httpd] Content Type
Date Tue, 05 Nov 2002 16:23:52 GMT
Greg:

> I just installed apache 1.3.26 on my debian box and tried to 
> run some perl
> cgi scripts I wrong and the broswer wanted me save the output.  After
> messing around a bit I discovered that apache was 
> changing/ignoring the
> content type that I was trying to use by printing it as the 
> first.  The
> script is executing becuase if I open it through the browser I see the
> correct output.  I am trying to make it a text/html content type but
> apache changes it to a application/x-perl because of the .pl 
> extention. 
> These scripts have worked just fine under other versions of 
> apache.so if
> anyone could tell me how to fix this I would be greatfull.

I ran into a similar issue a while back.  Basically, I had accidentally
added two handlers for the .cgi file extension.  What happened was the
server ignored the "AddHandler cgi-script" and just served it up as a .cgi
through the "server-parsed" handler which was rightly misunderstood by the
client.  It sounds to me like your issue is similar.  I guess I don't
understand this completely, but try getting rid of the AddType and
AddHandler entries for .pl and add...

    AddType application/x-httpd-cgi .pl
    AddHandler cgi-script .pl

It's my understanding that mod_cgi should handle sending the output of the
script with the correct headers no matter what the file extension.

 ~ Robert


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message