Skip to content
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

feature(SSLConnectionSocketFactory): Pass HttpContext to prepareSocket method #404

Merged
merged 6 commits into from
Jan 4, 2023
Merged

feature(SSLConnectionSocketFactory): Pass HttpContext to prepareSocket method #404

merged 6 commits into from
Jan 4, 2023

Conversation

alturkovic
Copy link
Contributor

Some implementations might depend on a variable present in the HttpContext which is available in most other methods.

@ok2c
Copy link
Member

ok2c commented Jan 4, 2023

@alturkovic The change-set breaks backward compatibility with 5.0 APIs.

By the way, one may be better off writing a custom SSLConnectionSocketFactory instead of trying to make the default one work in all specific cases.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  46.847 s
[INFO] Finished at: 2023-01-04T13:46:47Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.16.0:cmp (default) on project httpclient5: There is at least one incompatibility: org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory.prepareSocket(javax.net.ssl.SSLSocket):METHOD_REMOVED -> [Help 1]

@alturkovic
Copy link
Contributor Author

@ok2c Oops, added the method back. I understand, I just thought that having HttpContext available by default made sense.

@ok2c
Copy link
Member

ok2c commented Jan 4, 2023

@alturkovic Please deprecate the old method in favor of the new one.

@ok2c
Copy link
Member

ok2c commented Jan 4, 2023

@alturkovic Great. But please do it nicely and suppress deprecation warnings in the new method.

@alturkovic
Copy link
Contributor Author

Sorry, I do not know what you mean by that, I took a look how other methods are deprecated (i.e.: org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder#setTlsDetailsFactory) and I do not see any suppressions? Would you mind explaining a bit more what needs to be done?

@ok2c
Copy link
Member

ok2c commented Jan 4, 2023

@alturkovic Please add @SuppressWarnings("deprecation") annotation to the new method.

@ok2c ok2c merged commit d2016ea into apache:master Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants