[Mono-list] SetHandler vs. AddHandler

Gonzalo Paniagua Javier reply.to.the.list.iam.suscribed@notexists.ximian.com
Tue, 01 Feb 2005 13:35:57 -0500


On Tue, 2005-02-01 at 11:01 -0500, David P. Donahue wrote:
> I just installed the Mono Apache Module and started testing some basic
> C# websites with it.  I was noticing that certain files (specifically in
> the case of these small sites, .gif and .css files) were being returned
> but the clients couldn't understand them.  In debugging the problem, I
> found the section in the INSTALL file as follows:
> 
> -------------------------
> If you don't want mod-mono-server to handle all the files, but only
>    ASP.NET ones, you can replace the 'SetHandler mono' by:
> 
>         AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx
> 
>    but this will break PathInfo.
> -------------------------
> 
> I made this change in my httpd.conf where I specify the folders that
> require Mono's use, and this seems to have fixed the problem.  My
> concern, however, is where it says "this will break PathInfo."  I'm not
> entirely sure what that means.  What are the negative aspects of this
> configuration change?  Will it come back to bite me later?  Is there a
> better way to fix this problem?  I appreciate any advice you can give
> me, thanks.

For an URL like this:
http://www.someserver.com/somedir/somefile.ext/andthis/andthat

if /somedir/somefile.ext exists, /andthis/andthat is that pathinfo. As
long as you don't use that in the virtual directories handled by
mod-mono, you're fine.

-Gonzalo