Fix not working on Velocity (#234)

This commit is contained in:
Haowei Wen 2024-02-18 01:13:27 +08:00
parent 18d708d62c
commit cf9248bdbf

View file

@ -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);
}