summaryrefslogtreecommitdiffstats
path: root/tenant-cd
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-03-18 21:01:43 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-03-18 21:01:43 +0100
commitfe77d0d999c9f1f2b1188894ae8bbe1d4de91834 (patch)
treef7e232e9f682aa2c70bc9c6a1ad9c0470bb7b7a8 /tenant-cd
parent1458c473fbf7e81c2ed29a7d6e718923c3ca8c39 (diff)
Handle query both in given path and properties map
Diffstat (limited to 'tenant-cd')
-rw-r--r--tenant-cd/src/main/java/ai/vespa/hosted/cd/http/HttpEndpoint.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/tenant-cd/src/main/java/ai/vespa/hosted/cd/http/HttpEndpoint.java b/tenant-cd/src/main/java/ai/vespa/hosted/cd/http/HttpEndpoint.java
index cf32683ce19..1a160663d43 100644
--- a/tenant-cd/src/main/java/ai/vespa/hosted/cd/http/HttpEndpoint.java
+++ b/tenant-cd/src/main/java/ai/vespa/hosted/cd/http/HttpEndpoint.java
@@ -56,9 +56,9 @@ public class HttpEndpoint implements Endpoint {
@Override
public HttpRequest.Builder request(String path, Map<String, String> properties) {
return HttpRequest.newBuilder(endpoint.resolve(path +
- (properties.isEmpty() ? "" : properties.entrySet().stream()
- .map(entry -> encode(entry.getKey(), UTF_8) + "=" + encode(entry.getValue(), UTF_8))
- .collect(Collectors.joining("&", "?", "")))));
+ properties.entrySet().stream()
+ .map(entry -> encode(entry.getKey(), UTF_8) + "=" + encode(entry.getValue(), UTF_8))
+ .collect(Collectors.joining("&", path.contains("?") ? "&" : "?", ""))));
}
}