[KARAF-5694]strip url to ensure it's a valid one which could download
@@ -73,6 +73,7 @@ public class SimpleDownloadTask extends AbstractRetryableDownloadTask {
File tmpFile = File.createTempFile("download-", null, dir);
+ urlObj = new URL(DownloadManagerHelper.stripUrl(urlObj.toString()));
try (InputStream is = urlObj.openStream();
OutputStream os = new FileOutputStream(tmpFile)) {
StreamUtils.copy(is, os);
