Added missing filename encondig

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-09-01 17:06:51 +02:00
parent 2f415c4839
commit 30d64c95e4

View File

@@ -19,6 +19,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.stereotype.Component;
import com.google.common.base.Strings;
import com.google.common.net.UrlEscapers;
/**
* Implementation for ArtifactUrlHandler for creating urls to download resource
@@ -55,8 +56,8 @@ public class PropertyBasedArtifactUrlHandler implements ArtifactUrlHandler {
}
String urlPattern = properties.getPattern();
final Set<Entry<String, String>> entrySet = getReplaceMap(targetId, softwareModuleId, filename, sha1Hash,
protocolString, properties).entrySet();
final Set<Entry<String, String>> entrySet = getReplaceMap(targetId, softwareModuleId,
UrlEscapers.urlFragmentEscaper().escape(filename), sha1Hash, protocolString, properties).entrySet();
for (final Entry<String, String> entry : entrySet) {
if (entry.getKey().equals(PORT_PLACEHOLDER)) {
urlPattern = urlPattern.replace(":{" + entry.getKey() + "}",