Skip to content
Snippets Groups Projects
Commit 43a9bde2 authored by carlosuc3m's avatar carlosuc3m
Browse files

correct new url generation

parent 1c8100d3
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,7 @@ import java.io.FileOutputStream; ...@@ -7,6 +7,7 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.nio.channels.Channels; import java.nio.channels.Channels;
...@@ -323,7 +324,10 @@ public class DeepLearningVersionDownloader ...@@ -323,7 +324,10 @@ public class DeepLearningVersionDownloader
} catch (MalformedURLException ex) { } catch (MalformedURLException ex) {
} }
try { try {
String mainDomain = url.toURI().getHost(); URI uri = url.toURI();
String scheme = uri.getScheme();
String host = uri.getHost();
String mainDomain = scheme + "://" + host;
return new URL(mainDomain + newURL); return new URL(mainDomain + newURL);
} catch (URISyntaxException | MalformedURLException e) { } catch (URISyntaxException | MalformedURLException e) {
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment