Skip to content

Update for OkHttp3 #468

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

Merged
merged 1 commit into from
May 31, 2016
Merged

Update for OkHttp3 #468

merged 1 commit into from
May 31, 2016

Conversation

rogerhu
Copy link
Contributor

@rogerhu rogerhu commented May 27, 2016

Changes to square/okhttp@bab8943 has caused network interceptors to return headers all in lower case because a change in which the toMultimap() function. This change appears to have been added to avoid duplicate headers being sent (https://github.com/square/okhttp/blob/bab8943f2b5c8bc44a64067ada556aa62fcec3a7/okhttp-tests/src/test/java/okhttp3/internal/http/HeadersTest.java#L298-L306).

The downside is that Parse/OkHttp network interceptors exhibit this behavior, but normal interceptors do not. We call the toMultimap() routine that causes headers to be converted to lowercase on downstream requests (see https://github.com/ParsePlatform/Parse-SDK-Android/blob/master/Parse/src/main/java/com/parse/ParseOkHttpClient.java#L187-L189)

I updated the tests to rely on lowercase headers to avoid the test falures. I think the reasoning behind needing toMultiMap() is in case someone needs to rewrite the headers and you want to make sure you are overwriting the right one.

@ghost
Copy link

ghost commented May 27, 2016

By analyzing the blame information on this pull request, we identified @grantland, @Allsimon and @wangmengyan95 to be potential reviewers.

@grantland
Copy link
Contributor

Looks like there are test failures

@ghost
Copy link

ghost commented May 28, 2016

@rogerhu updated the pull request.

@ghost
Copy link

ghost commented May 28, 2016

@rogerhu updated the pull request.

@ghost
Copy link

ghost commented May 29, 2016

@rogerhu updated the pull request.

@grantland
Copy link
Contributor

Looks great, thanks for the fix!

@grantland grantland added this to the 1.13.1 milestone May 31, 2016
@grantland grantland self-assigned this May 31, 2016
@grantland grantland merged commit 0764933 into parse-community:master May 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants