-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rework WebDavSocketFactory to use DefaultTrustedSocketFactory #1182
Conversation
It's probably better than what we currently have. But I'm not too happy with this. Using I made some adjustments here: https://github.com/k9mail/k-9/tree/WebDavSocketFactory_rewrite PS: In the long term I want us moving away from the Apache HTTP API to OkHttp. |
Yep sure I'll pull the branch and let you know. |
After I fixed a NPE caused by not setting the trusted socket factory (a bug in my original commit I think) - see https://github.com/philipwhiuk/k-9/commit/cbe6e3b9b1c7820194b5f437ee6f54910d785713 I got the following stacktrace. But this also seems to happen with my original PR too :( Obviously I didn't test it properly.... I'm going to close this and re-work it I think. I may just move us straight to OkHttp3 - it might be easier. Thanks anyway
|
Here we go. I've unpicked the chaos, documented the odd behaviour and reverted the change I made for the reasons I've documented.
I've moved to using the DefaultTrustedSocketFactory directly, which means it's less prone to error. I've also added tests for the expected behaviour.