Vladimir
Vladimir

Reputation: 241

Grails spaces decoded as plus signs if parameter text is ASCII

I have a problem in my production Grails app with decoding POST request parameters.

Whenever a parameter contains ASCII characters only, all the spaces in the text are decoded as '+' signs. So, instead of 'this is a test' controller gets 'this+is+a+test' parameter value.

More to that, if the parameter text contains even a single non ASCII character, say, we replace latin 'a' with cyrillic 'a', the problem is gone.

And yes, everything is Ok while running application on Windows 7 development machine in Intellij Idea IDE 11.x or as a war archive deployed to standalone local Tomcat 7.0.29.

The production app is deployed as war archive with all dependencies to Ubuntu/Tomcat 7.0.21 on SSL connector port 8443. The connector is configured with attribute URIEncoding="UTF-8"

The settings in Config.groovy are

All gsp's have meta declaration http-equiv="Content-Type" content="text/html; charset=UTF-8" in the head element.

The application plugins are webxml:1.4.1, tomcat:$grailsVersion, hibernate:$grailsVersion, spring-security-core:1.2.7.3, spring-security-openid:1.0.4

As a last attempt I tried to upgrade Grails version from 2.2.0 to the latest 2.2.2 but no result.

It seems my case is opposite to many others like these

Can anyone help?

Thanks.

Upvotes: 0

Views: 1074

Answers (1)

Vladimir
Vladimir

Reputation: 241

I've finally solved the space problem by upgrading Tomcat version from 7.0.21 to 7.0.39. No application files have been modified.

Upvotes: 3

Related Questions