Add httpProtocol method to WebServiceClient.Builder#591
Add httpProtocol method to WebServiceClient.Builder#591ggabora wants to merge 1 commit intomaxmind:mainfrom
Conversation
|
Hi! Thanks for the PR. Could you tell me about the use case for this option? I think generally HTTP/1.1 should be discouraged, e.g. https://http1mustdie.com/, so I'm not sure about adding something new to enable it. |
|
@horgh Hi, we have a case when we get connection reset on the WebServiceClient connections because of network/firewall inbetween our app and maxmind. In other cases where we use HttpClient with http/1.1 we set the jdk keepalive timeout to a lower value than the one of the network/firewall so that the connections in the pool are 'evicted' sooner. In case of http/2 there is no such option so the simplest solution for us would be to downgrade to http/1.1. Thanks! |
|
Btw, maybe an increase in the minor version is more appropriate for this change? |
|
Thanks for the background! It looks like there is a similar setting to the one you mentioned for HTTP/1.1 that applies for HTTP/2 connections: |
|
It would work if we could use Java 20 where this change was introduced https://bugs.openjdk.org/browse/JDK-8295649 |
|
Morning, migrating to java 20+ is not possible in the near future, so we're stuck with this fix. |
|
I see. To that end, I've added a method to the builder called |
|
Great, thank you! When is the next release scheduled? |
|
Not needed anymore because it is solved by #592 |
|
I think we should be able to release in the next day or two! |
|
We released 4.4.0 with this! https://central.sonatype.com/artifact/com.maxmind.geoip2/geoip2 |
|
Great, thank you again for your help! |
httpVersion()method onWebServiceClient.Builderwhich allows configuring HTTP protocol version (HTTP/1.1 or HTTP/2) for web
service requests.
timeout settings, authentication, and connection management.