Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not defaulting to UTF-8 encoding in request #4228

Closed
andidev opened this issue Oct 18, 2015 · 1 comment
Closed

Not defaulting to UTF-8 encoding in request #4228

andidev opened this issue Oct 18, 2015 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@andidev
Copy link

andidev commented Oct 18, 2015

After upgrading to Spring Boot 1.3.0.M5 from 1.2.6.RELEASE I have problems with logging in with usernames containing non ASCII characters. It seems that the encoding in the request parameters is ISO-8859-1 instead of UTF-8 and therefore the user is not found.

The login is trying to POST with

'Content-Type': 'application/x-www-form-urlencoded'

Here is a sample JHipster application showing this problem. You can start it with mvn spring-boot:run and try to login with username abcåäö and password user.

The issue can be solved with adding the encoding into the content type by setting it to

'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'

in src/main/webapp/scripts/components/auth/provider/auth.session.service.js

Here is a screenshot of the request from the browser console
screen shot 2015-10-18 at 14 24 21

and here is the request created by the server
screen shot 2015-10-18 at 14 28 22

as you can see the ecoding is not UTF-8 but the queryStringEncoding is UTF-8

@wilkinsona
Copy link
Member

Duplicates #3912

@wilkinsona wilkinsona added the status: duplicate A duplicate of another issue label Oct 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants