cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <>
Subject RE: MountTableMatcher ending slash
Date Thu, 27 May 2004 08:20:49 GMT
Sylvain Wallez wrote: 
> ?? The use of the mount table doesn't change the <map:mount> 
> semantics, and if the mount occurs, there's no turning back 
> to the parent sitemap.
> >The change claims:
> >  // Append a '/' at the end of the prefix
> >  // this avoids flat uri matching which would cause
> >  // exceptions in the sub sitemap! 
> >I was not getting exceptions like this in 2.1.4...could 
> anyone explain 
> >in more detail the reasons for this change?
> >  
> >
> Yep. Carsten (you did this patch)?
Yes, I feel guilty...the reason for the patch was, I had severe
problems with the following:

<mount uri-prefix="woody-samples" src="../../src/blocks/woody/samples/"/>

Now, if I use the url "cocoon/woody-samples" the request is passed
to the subsitemap and did cause exceptions there ("The current URI 
(woody-samples) doesn't start with given prefix (woody-samples/)).
Then I thought about this issue and had the impression that a
request with "cocoon/woody-samples" should not go to the
subsitemap. Only a request a la "cocoon/woody-samples/" should
go there.

> ><alternate-solution>
> >  We could have a passthru="true" attribute on map:mount's to
> >  turn on pass through behaviour...
> ></alternate-solution>
> >  
> >
> The mount table uses the exact same syntax as <map:mount> 
> where no slash is automagically added. This allows mounts to 
> occur in the same directory of the URL space.
> So IMO, the right solution is to assume the user has properly 
> written the prefix, and therefore revert this modification.
I'm not sure :) If you use a mount, you have a match before, like
<map:match pattern="samples/*"> you explicitly take care that
the uri has an ending slash.
If you do:

<map:match pattern="samples**">
    <map:mount check-reload="yes" src="samples/" uri-prefix="samples"/>

and call "localhost/samples", you get the same exception
"The current URI (samples) doesn't start with given prefix (samples/)"


View raw message