-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
header encoding issues #516
Comments
@JakeWharton #513 may be related? |
Reproduced this. Investigating now. |
According to RFC 2616 (HTTP) headers use the ISO-8859-1 character set. Alternate character sets can be used if they are encoded using RFC 2047. When using the Apache client it seems to be working (using MockWebServer) but both OkHttp and UrlConnection clients get the garbled characters like you saw. We need to figure out the right owner of handling the encoding here. Since the Apache client already supports it I'm inclined to say that we should add it to OkHttp. I need to have a chat with some people internally before we can move forward. You can see the code I was playing with here: https://github.com/square/retrofit/compare/jw;broken-header-encoding |
Moved to OkHttp. |
Hi,
When passing headers parameters containing a 'é' it is received on server side as 'é'.
It might seem wird to pass such chars as arguments but I can't modify server side.
I know this behaviour is specific to retrofit because it worked with the old client using HttpUrlConnection and it also works with Postman chrome plugin.
I don't know if this bug comes from retrofit itself or from the underlying okhttpClient i'm using.
I've tried with the folowing versions
retrofit : 1.5.0 & 1.5.1
okhttp : 1.5.4 , 1.6.0 & 2.0.0-RC1
I hope this might help.
The text was updated successfully, but these errors were encountered: