0

I'm testing Play! on Windows and Ubuntu. I have an action method that accepts an email parameter.

When I pass an email address that contains a plus sign (e.g. abc+d@gmail.com), on Windows it works as expected, while on my ubuntu box I get abc d@gmail.com assigned to the email parameter.

Has anyone encountered this situation before? I have no front-end proxy in front of Play - in both cases, it's direct access to the same version of Play (1.2.x-c40cf37, somewhat after 1.2.4), with the same application.mode = dev, pretty much the same config.

I can't debug the linux box - it's on an Amazon EC2 instance, and the Java debugging protocol is slow as hell for me. If I can't find another way, I'll have to install a local unbutu in a VM and debug it there. Before I do that, are there any other helpful tips I could try?

ripper234
  • 222,824
  • 274
  • 634
  • 905

1 Answers1

4

This is standard behaviour.

On a URL spaces can be represented by +. You need to escape it using %20.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • This still doesn't explain the difference between Windows and Linux, but I get that in this case Windows might not follow the standard. I'll try encoding. – ripper234 Jan 22 '12 at 12:19
  • @ripper234 - This has more to do with how the different browsers do things. – Oded Jan 22 '12 at 12:20
  • That's odd though - I'm using the same browser on the same machine to access both servers. – ripper234 Jan 22 '12 at 12:28
  • Well, URL encoding worked. I still don't quite understand the difference between Windows and Ubuntu, but it works - thanks. – ripper234 Jan 22 '12 at 12:37
  • Note that a space can only be encoded as a plus sign in the query string, not in the URL path. – Peter Hilton Jan 23 '12 at 13:42