Truncated URLs #23

channingwalton opened this Issue May 23, 2009 · 4 comments

3 participants


I have a problem with URLs whose last path segment contains a
fullstop, eg: /x/3.1/y/1.11

To illustrate the issue, I created a new lift project and added the
following to the Boot:

LiftRules.dispatch.prepend { 
    case Req(List("x", x,"y", y), _, _) => () => Full(XmlResponse( <p>x={ x } y={ y } </p> )) 

Pointing a browser at /x/3.1/y/1.11 returns: x=3.1 y=1
So y is being truncated at the fullstop.
Doing this in Java with Jetty and a servlet, I can get the full path
out and parse it correctly so is Lift misbehaving?

Lift Web Framework member

Actually, this is defined behavior. When you posted to the list, I misunderstood your post.

Lift returns the suffix of the last element in the parse path in the second parameter of the Req(). So, in this case, Req(List("x", x,"y", y), suf, _), suf == "11"

Lift Web Framework member

Ah ok, thanks for that.

Lift Web Framework member
Lift Web Framework member
@dpp dpp was assigned Mar 1, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment