mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-26 08:37:11 -07:00
Revert unwanted previous commit
This commit is contained in:
parent
4ac6490dec
commit
f00418b4c2
1 changed files with 1 additions and 7 deletions
|
@ -189,13 +189,7 @@ public abstract class ArtifactRetriever {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static URLConnection openUrlConnection(RepositoryArtifact artifact) throws IOException {
|
private static URLConnection openUrlConnection(RepositoryArtifact artifact) throws IOException {
|
||||||
String location;
|
var connection = new URL(artifact.location()).openConnection();
|
||||||
if (artifact.location().matches("[a-z][a-z0-9+\\-.]*://.*")) {
|
|
||||||
location = artifact.location();
|
|
||||||
} else {
|
|
||||||
location = new File(artifact.location()).toURI().toString();
|
|
||||||
}
|
|
||||||
var connection = new URL(location).openConnection();
|
|
||||||
connection.setUseCaches(false);
|
connection.setUseCaches(false);
|
||||||
connection.setRequestProperty("User-Agent", "bld " + BldVersion.getVersion());
|
connection.setRequestProperty("User-Agent", "bld " + BldVersion.getVersion());
|
||||||
return connection;
|
return connection;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue