From 8f7dc3336a188d540bfb8c5f82c927b34c31e540 Mon Sep 17 00:00:00 2001 From: Vijayabaskar R Date: Tue, 13 Jan 2026 12:19:29 +0530 Subject: [PATCH] Encode '+' in URL path segments to support SemVer build metadata --- server/src/main/java/org/eclipse/openvsx/util/UrlUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/eclipse/openvsx/util/UrlUtil.java b/server/src/main/java/org/eclipse/openvsx/util/UrlUtil.java index 861d7000a..762094500 100644 --- a/server/src/main/java/org/eclipse/openvsx/util/UrlUtil.java +++ b/server/src/main/java/org/eclipse/openvsx/util/UrlUtil.java @@ -101,7 +101,12 @@ public static String createApiUrl(String baseUrl, String... segments) { var path = Arrays.stream(segments) .filter(StringUtils::isNotEmpty) - .map(segment -> UriUtils.encodePathSegment(segment, StandardCharsets.UTF_8)) + .map(segment -> + UriUtils.encodePathSegment(segment, StandardCharsets.UTF_8) + .replace("+", "%2B") +) + + .collect(Collectors.joining("/")); if (baseUrl.isEmpty() || baseUrl.charAt(baseUrl.length() - 1) != '/') {