ParsePath, endSlash not working?

25 views
Skip to first unread message

Prag

unread,
Mar 30, 2011, 8:06:27 PM3/30/11
to Lift
hi,

I can't get ParsePath to work when using the endSlash argument.

This does work for /foo/bar :
LiftRules.statelessRewrite.append {
case RewriteRequest(ParsePath(List("foo", "bar"), _, _, _), _, _)
=> RewriteResponse(List("test"))
}

however, this doesn't work for /foo/bar/ :
LiftRules.statelessRewrite.append {
case RewriteRequest(ParsePath(List("foo", "bar"), _, _, true), _,
_) => RewriteResponse(List("test"))
}
The true value should indicate that the URI is ending at a slash, but
it doesn't seem to work. It will give a http 404 not found with
message "The Requested URL /foo/bar/ was not found on this server".

Here some a problem example:
https://github.com/PragProgger/lifttest2
g...@github.com:PragProgger/lifttest2.git

David Pollak

unread,
Mar 30, 2011, 8:08:59 PM3/30/11
to lif...@googlegroups.com
On Wed, Mar 30, 2011 at 5:06 PM, Prag <pragp...@gmail.com> wrote:
hi,

I can't get ParsePath to work when using the endSlash argument.

This does work for /foo/bar :
LiftRules.statelessRewrite.append {
 case  RewriteRequest(ParsePath(List("foo", "bar"), _, _, _), _, _)
=> RewriteResponse(List("test"))
}

however, this doesn't work for /foo/bar/ :
LiftRules.statelessRewrite.append {
 case  RewriteRequest(ParsePath(List("foo", "bar"), _, _, true), _,
_) => RewriteResponse(List("test"))
}
The true value should indicate that the URI is ending at a slash, but
it doesn't seem to work.

/foo/bar/ matches against List("foo", "bar", "index")
 
It will give a http 404 not found with
message "The Requested URL /foo/bar/ was not found on this server".

Here some a problem example:
https://github.com/PragProgger/lifttest2
g...@github.com:PragProgger/lifttest2.git

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net
Reply all
Reply to author
Forward
0 new messages