[Mono-list] Rewriting path with an HttpModule

Gonzalo Paniagua Javier gonzalo@ximian.com
24 Mar 2003 22:30:44 +0100

El lun, 24 de 03 de 2003 a las 21:04, Daniel Lopez escribió:
> > This way we can register any possible path 'mapper' method adding it to
> > MapPathEvent. If there is one of those 'mappers' that recognizes the
> > path and map it to a real path (ie, sets MappedPath), we return that
> > path.
> > 
> > What do you think?
> Yes, that was I had in mind, maybe even integrating with teh 
> rest of events (BeginRequest, etc.)

I'll add this to MonoWorkerRequest.

> > > b) Other parts of the code do not make assumptions that physical paths are
> > > rooted in the Application physical path, as for example happens in 
> > > mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
> > > See patch in 
> > > http://lists.ximian.com/archives/public/mono-list/2003-March/012992.html
> > 
> > templatePath should be the absolute virtual directory of the file being
> > processed. That's not a file system path. It's used to look for other
> > files referred from the one being processed.
> Exactly :)  What I am saying is that, in order to get that virtual path,
> GetTemplateDirectory() it substracts two physical directory paths, the one
> containing the file and the AppDomainAppPath. That assumes that they have a
> common initial part. This is true currently, but if you introduce a mapping
> function that maps to arbitrary files then it is not. That´s why I had to
> patch it (though I dont know if the change I introduced was the right one)

Mmm. I'll fix this too.

Muchísimas gracias!