mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
restore the connect timeout feature
This commit is contained in:
@@ -101,10 +101,11 @@ public class HttpGetter {
|
||||
return new HttpResult(content, contentType, lastModifiedHeader, eTagHeader, duration, urlAfterRedirect);
|
||||
}
|
||||
|
||||
public static HttpClient newClient() {
|
||||
private HttpClient newClient() {
|
||||
SSLFactory sslFactory = SSLFactory.builder().withUnsafeTrustMaterial().withUnsafeHostnameVerifier().build();
|
||||
return HttpClient.newBuilder()
|
||||
.version(Version.HTTP_1_1)
|
||||
.connectTimeout(Duration.ofSeconds(5))
|
||||
.followRedirects(Redirect.ALWAYS)
|
||||
.sslContext(sslFactory.getSslContext())
|
||||
.sslParameters(sslFactory.getSslParameters())
|
||||
|
||||
Reference in New Issue
Block a user