diff --git a/core b/core index fa56772..5f97763 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit fa567721c00d99626ed439db4f0340eadff0ec03 +Subproject commit 5f977636531d1b978b762a615d720097baa37830 diff --git a/src/main/java/rife/bld/dependencies/ArtifactRetriever.java b/src/main/java/rife/bld/dependencies/ArtifactRetriever.java index 7364fac..ac98ebd 100644 --- a/src/main/java/rife/bld/dependencies/ArtifactRetriever.java +++ b/src/main/java/rife/bld/dependencies/ArtifactRetriever.java @@ -6,6 +6,8 @@ package rife.bld.dependencies; import rife.bld.BldVersion; import rife.tools.FileUtils; +import rife.tools.HttpUtils; +import rife.tools.Product; import rife.tools.exceptions.FileUtilsErrorException; import java.io.File; @@ -191,7 +193,7 @@ public abstract class ArtifactRetriever { private static URLConnection openUrlConnection(RepositoryArtifact artifact) throws IOException { var connection = new URL(artifact.location()).openConnection(); connection.setUseCaches(false); - connection.setRequestProperty("User-Agent", "bld " + BldVersion.getVersion()); + connection.setRequestProperty(HttpUtils.HEADER_USER_AGENT, Product.BLD.toUserAgent(BldVersion.getVersion())); return connection; } diff --git a/src/main/java/rife/bld/wrapper/Wrapper.java b/src/main/java/rife/bld/wrapper/Wrapper.java index 3164b5d..bf2c939 100644 --- a/src/main/java/rife/bld/wrapper/Wrapper.java +++ b/src/main/java/rife/bld/wrapper/Wrapper.java @@ -830,7 +830,7 @@ public class Wrapper { throws IOException { var connection = url.openConnection(); connection.setUseCaches(false); - connection.setRequestProperty("User-Agent", "bld " + version); + connection.setRequestProperty(HttpUtils.HEADER_USER_AGENT, Product.BLD.toUserAgent(version)); try (var in = connection.getInputStream()) { return new String(in.readAllBytes(), StandardCharsets.UTF_8); }