Google Groups

Re: [Lift] RestHelper GET strips off .com when GETting email as parameter with .com address

Jeppe Nejsum Madsen Mar 20, 2012 4:59 AM
Posted in group: Lift
On Tue, Mar 20, 2012 at 12:00 PM, Albert Sikkema <> wrote:
> Hi All,
> I'm using the RestHelper to create a restful service. All works great,
> however I'm running into a weird thing. When submitting an email via an HTTP
> GET with a .com domain it strips off the .com in the rest endpoint. Any
> other domain (.nl for example) works.
> function:
> case "check" :: "email" :: email :: _ Get _ => {
>       println("rest email = " + email)
> //logic..
> }
> when submitting: http://localhost:8080/check/email/ it
> prints: "rest email = testperson@domain"
> when submitting: http://localhost:8080/check/email/ it
> prints: "rest email ="
> I can't see why it behaves differently for .com, I've tried many
> variations(like .coms), but it only strips off .com somehow. Is this
> intended behavior? (should I encode the email or something?)

Have a look at LiftRules.explicitlyParsedSuffixes

   * When a request is parsed into a Req object, certain suffixes are
explicitly split from
   * the last part of the request URI.  If the suffix is contained in
this list, it is explicitly split.
   * The default list is: "html", "htm", "jpg", "png", "gif", "xml",
"rss", "json" ...
  @volatile var explicitlyParsedSuffixes: Set[String] = knownSuffixes