且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apache http客户端默认设置不适用于sni

更新时间:2021-09-21 21:39:14

问题最终是另一个依赖项不仅使用了不同版本的httpclient,而且还将其打包到jar中,而不将其列为传递依赖项。 (意思是,当你去检查pom依赖层次结构时它没有出现,因此它不能被标记为使用的版本)。

The issue ended up being that another dependency was not only using a different version of the httpclient, BUT was also packaging it into its jar without listing it as a transitive dependency. (meaning, that it doesn't show up when you go to inspect the pom dependency hierarchy, so it can't be flagged out as the "used version").

有问题的依赖是:

<dependency>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-dev</artifactId>
    <version>2.7.0</version>
</dependency>

它的jar中包含apache http的代码,并且在其pom中未列出。
它引用的版本是4.3.1,它表现出这个问题。 (4.3.2及以后不要)。

It has the code for apache http included in its jar, and unlisted in its pom. And the version it references is 4.3.1, which exhibits this problem. (4.3.2 and onward do not).

有两种解决方法:



  1. pom.xml中的列表中包含http客户端依赖 1st

从pom.xml中删除gwt-dev依赖项

Remove the gwt-dev dependency from the pom.xml