From 5f43714cc79e70cdec96b596605b0a4ab10ef245 Mon Sep 17 00:00:00 2001 From: TechnologyClassroom Date: Wed, 15 Apr 2026 23:49:43 -0400 Subject: [PATCH] Update user-agent string. --- src/org/spdx/crossref/Live.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/spdx/crossref/Live.java b/src/org/spdx/crossref/Live.java index 472dd5b..b26d1b9 100644 --- a/src/org/spdx/crossref/Live.java +++ b/src/org/spdx/crossref/Live.java @@ -39,7 +39,7 @@ public class Live implements Callable { public Live(String url) { this.url = url; } - + /** * @param URLName the url in string form * @return true/false if the url is live or not @@ -49,7 +49,7 @@ public static boolean urlLinkExists(String URLName){ HttpURLConnection.setFollowRedirects(true); HttpURLConnection con = (HttpURLConnection) new URL(URLName).openConnection(); // fake request coming from browser - con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"); + con.setRequestProperty("User-Agent", "Mozilla/5.0 SPDX LicenseListPublisher (File issues on the https://github.com/spdx/LicenseListPublisher/ issue tracker.)"); con.setRequestMethod("HEAD"); con.setConnectTimeout(30000); con.setReadTimeout(30000); @@ -63,7 +63,7 @@ public static boolean urlLinkExists(String URLName){ return false; } } - + @Override public Boolean call() throws Exception { return urlLinkExists(url);