I've reproduced this on my server. The right content is being returned, but 
with a "httpd/unix-directory" content type.

   swartz> GET -eSs http://localhost:2400
   GET http://localhost:2400 --> 200 OK
   Connection: close
   Date: Wed, 14 Sep 2011 18:10:50 GMT
   Server: Apache/2.2.3 (Unix)
   Content-Type: httpd/unix-directory
   Client-Date: Wed, 14 Sep 2011 18:10:51 GMT
   Client-Peer: 127.0.0.1:2400
   Client-Response-Num: 1
   Client-Transfer-Encoding: chunked
   
   Hi! The local time is Wed Sep 14 11:10:51 2011.

The "DefaultType" doesn't help in this case because the content type has 
already been set by mod_dir.

So what's the right way to handle this? Something inside the PSGI handler that 
sets the content type to text/html if it was already set to a directory?

Jon


On Sep 13, 2011, at 3:45 PM, Joseph Shin wrote:

> Hi All,
> 
> I was messing around with Mason2 and ran into this issue when using 
> Plack::Handler::Apache2 with Mason.
> 
> When i go to:
> 
> http://www.p5k.com
> 
> I get:
> 
> you have chosen to open..
> which is a: httpd/unix-directory
> 
> When I go to:
> 
> http://www.p5k.com/index
> 
> All is well.
> 
> http://old.nabble.com/Content-Type-For-Index.mc-td31176468.html
> 
> Describes my problem to a tee, but removing the DocumentRoot and bouncing the 
> server doesn't solve this issue.
> 
> Any Ideas?  Thanks!
> 
> Joe
> 
> <VirtualHost *:80>
>     ErrorLog /var/log/httpd/p5k.error_log
>     ServerName p5k.com
>     ServerAlias www.p5k.com
>     <Location />
>         SetHandler perl-script
>         PerlResponseHandler Plack::Handler::Apache2
>         PerlSetVar psgi_app  /home/webuser/p5k.com/web/app.psgi
>         DefaultType text/html
>     </Location>
> </VirtualHost>
> 
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> Learn about the latest advances in developing for the 
> BlackBerry&reg; mobile platform with sessions, labs & more.
> See new tools and technologies. Register for BlackBerry&reg; DevCon today!
> http://p.sf.net/sfu/rim-devcon-copy1 
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to