Skip to content

Commit 8c853e5

Browse files
committed
JavaCL: update AMD download link, and set a user-agent on the request (otherwise it responds with a 403!!)
1 parent a0e2f8c commit 8c853e5

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

libraries/OpenCL/Demos/src/main/java/com/nativelibs4java/opencl/demos/SetupUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class SetupUtils {
3333

3434
public enum DownloadURL {
35-
ATI("http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/"),
35+
ATI("http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk"),
3636
NVidia("http://www.nvidia.com/Download/Find.aspx");
3737

3838
public final URL url;

libraries/OpenCL/Demos/src/test/java/com/nativelibs4java/opencl/demos/SetupUtilsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class SetupUtilsTest {
1919
public void checkValidDownloadLinks() throws IOException {
2020
for (SetupUtils.DownloadURL url : SetupUtils.DownloadURL.values()) {
2121
HttpURLConnection con = (HttpURLConnection) url.url.openConnection();
22+
con.setRequestProperty("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36");
2223
assertEquals("Bad url for " + url + " : " + url.url, 200, con.getResponseCode());
2324
con.disconnect();
2425
}

0 commit comments

Comments
 (0)