From cf9248bdbf8459887d2862fde6c585f0341007b1 Mon Sep 17 00:00:00 2001 From: Haowei Wen Date: Sun, 18 Feb 2024 01:13:27 +0800 Subject: [PATCH] Fix not working on Velocity (#234) --- src/main/java/moe/yushi/authlibinjector/httpd/URLProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/moe/yushi/authlibinjector/httpd/URLProcessor.java b/src/main/java/moe/yushi/authlibinjector/httpd/URLProcessor.java index 9de18f3..8b2bfa6 100644 --- a/src/main/java/moe/yushi/authlibinjector/httpd/URLProcessor.java +++ b/src/main/java/moe/yushi/authlibinjector/httpd/URLProcessor.java @@ -188,7 +188,7 @@ public class URLProcessor { conn.setDoOutput(clientIn != null); requestHeaders.forEach(conn::setRequestProperty); - if (clientIn != null) { + if (clientIn != null && !method.equalsIgnoreCase("GET") && !method.equalsIgnoreCase("HEAD")) { try (OutputStream upstreamOut = conn.getOutputStream()) { transfer(clientIn, upstreamOut); }