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
1 changed files with 1 additions and 1 deletions

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