This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ws-neethi.git
commit 26f81a6b860135d557fb161850fb6d47e247a52f Author: Colm O hEigeartaigh <[email protected]> AuthorDate: Tue Apr 21 13:33:01 2026 +0100 Don't follow redirects for policies --- src/main/java/org/apache/neethi/PolicyReference.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/apache/neethi/PolicyReference.java b/src/main/java/org/apache/neethi/PolicyReference.java index 8477f50..80c113d 100644 --- a/src/main/java/org/apache/neethi/PolicyReference.java +++ b/src/main/java/org/apache/neethi/PolicyReference.java @@ -21,6 +21,7 @@ package org.apache.neethi; import java.io.IOException; import java.io.InputStream; +import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.URL; @@ -171,6 +172,7 @@ public class PolicyReference implements PolicyComponent { connection.setDoInput(true); connection.setConnectTimeout(5000); connection.setReadTimeout(10000); + ((HttpURLConnection) connection).setInstanceFollowRedirects(false); InputStream in = connection.getInputStream(); try {
