From 9c926d31833a3f83c2af2ee085d73055a7c681a2 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 2 Feb 2022 08:05:43 +0000 Subject: [PATCH] Force use HTTP 1.1 temporarily. (#177) --- src/main/java/me/kavin/piped/consts/Constants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/kavin/piped/consts/Constants.java b/src/main/java/me/kavin/piped/consts/Constants.java index 29a102d..234687a 100644 --- a/src/main/java/me/kavin/piped/consts/Constants.java +++ b/src/main/java/me/kavin/piped/consts/Constants.java @@ -76,8 +76,8 @@ public class Constants { if (key.startsWith("hibernate")) hibernateProperties.put(key, value); }); - Builder builder = HttpClient.newBuilder().followRedirects(Redirect.NORMAL).version(Version.HTTP_2); - Builder builder_noredir = HttpClient.newBuilder().followRedirects(Redirect.NEVER).version(Version.HTTP_2); + Builder builder = HttpClient.newBuilder().followRedirects(Redirect.NORMAL).version(Version.HTTP_1_1); + Builder builder_noredir = HttpClient.newBuilder().followRedirects(Redirect.NEVER).version(Version.HTTP_1_1); if (HTTP_PROXY != null && HTTP_PROXY.contains(":")) { String host = StringUtils.substringBefore(HTTP_PROXY, ":"); String port = StringUtils.substringAfter(HTTP_PROXY, ":");