Skip to content

Update for OkHttp3 #435

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 27, 2016
Merged

Update for OkHttp3 #435

merged 1 commit into from
May 27, 2016

Conversation

rogerhu
Copy link
Contributor

@rogerhu rogerhu commented Apr 6, 2016

Fixes for OkHttp3

@facebook-github-bot
Copy link

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

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@facebook-github-bot
Copy link

@rogerhu updated the pull request.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot
Copy link

@rogerhu updated the pull request.

okHttpClient.setSslSocketFactory(SSLCertificateSocketFactory.getDefault(
socketOperationTimeout, sslSessionCache));
// Broken until OkHttp3 can expose trust managers -- https://github.com/square/okhttp/commit/85f74e2004eaf0d4ff339e8644df3d8e716361e5
// builder.sslSocketFactory(SSLCertificateSocketFactory.getDefault(socketOperationTimeout, sslSessionCache));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still necessary given the connect timeout is already setup above?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure, but I think this was a relic from our original use of AndroidHttpClient.newInstance(userAgent, sessionCache).

If you are sure that OkHttp client doesn't need a SSL cache, I'd be happy to accept this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need one except helps obviously with saving SSL handshakes when reconnecting.

In order to use it, I think we have to wait for OkHttp v3.3.0 to drop. See conversation here:

square/okhttp#2323 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough experience to know whether SSL session caching functionality is a blocker... anyone on the Parse team could provide some insight?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be safe to use the default, so we can just remove this bit.

@facebook-github-bot
Copy link

@rogerhu updated the pull request.

@facebook-github-bot
Copy link

@rogerhu updated the pull request.

@setheclark
Copy link

I don't see a change in the ParseHttpClient class to update the OKHTTPCLIENT_PATH field for OkHttp3. I think this means the classpath lookup to make sure OkHttp3 in available would fail.

@rogerhu
Copy link
Contributor Author

rogerhu commented May 3, 2016

Thanks for checking. Updated.

@ghost
Copy link

ghost commented May 3, 2016

@rogerhu updated the pull request.

@grantland
Copy link
Contributor

grantland commented May 27, 2016

Mind removing that commented out bit and squashing? After that it LGTM!

@grantland grantland added this to the 1.13.1 milestone May 27, 2016
@grantland grantland self-assigned this May 27, 2016
@rogerhu
Copy link
Contributor Author

rogerhu commented May 27, 2016

Remove commented section

@ghost
Copy link

ghost commented May 27, 2016

@rogerhu updated the pull request.

@grantland grantland merged commit 7725a96 into parse-community:master May 27, 2016
@grantland
Copy link
Contributor

Merging. Thanks for the contribution!

@rogerhu
Copy link
Contributor Author

rogerhu commented May 28, 2016

Thanks! Any chance to cut a release?

@grantland
Copy link
Contributor

Currently waiting on one PR, but will make a cut next week if it isn't in by then.

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.

4 participants