From d2a674fb4f6f919efcca5de794b9a745b67d147d Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:13:21 +0100 Subject: [PATCH] Fix webclient missing polyfill (#232) --- .../copyartifact/testutils/CopyArtifactJenkinsRule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactJenkinsRule.java b/src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactJenkinsRule.java index 97a933ed..df95d9a7 100644 --- a/src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactJenkinsRule.java +++ b/src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactJenkinsRule.java @@ -60,7 +60,7 @@ public class CopyArtifactJenkinsRule extends JenkinsRule { * This happens when accessing build page of a project with parameters. */ public JenkinsRule.WebClient createAllow405WebClient() { - return new JenkinsRule.WebClient() { + WebClient webClient = new WebClient() { private static final long serialVersionUID = 2209855651713458482L; @Override @@ -84,6 +84,8 @@ public void printContentIfNecessary(WebResponse webResponse) { super.printContentIfNecessary(webResponse); } }; + webClient.getOptions().setFetchPolyfillEnabled(true); + return webClient; } /**