Skip to content

fix: socketfactory not registered for apache#1637

Merged
chingor13 merged 2 commits intogoogleapis:masterfrom
arithmetic1728:master
Nov 16, 2020
Merged

fix: socketfactory not registered for apache#1637
chingor13 merged 2 commits intogoogleapis:masterfrom
arithmetic1728:master

Conversation

@arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented Nov 13, 2020

For GoogleApacheHttpTransport, socketFactory has to be registered for https, and provided to connectionManager. This PR does the following:

  • register socket factory for http and https, and pass to connection manager (reference)
  • removed .setSSLSocketFactory(socketFactory) from the chain of calls after HttpClientBuilder.create(), since it will be overwritten by .setConnectionManager(connectionManager)

@arithmetic1728 arithmetic1728 requested a review from a team November 13, 2020 07:49
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 13, 2020
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

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

This could use a test.

@arithmetic1728
Copy link
Contributor Author

This could use a test.

Refactored the code and added test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants