Skip to content

Commit 87a4a46

Browse files
slaurieretimols
authored andcommitted
Files containing spaces in their path are wrongly encoded (timols#331) (timols#332)
- Encode '+' characters in paths in '%20'
1 parent d12fc1d commit 87a4a46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/gitlab/api/GitlabAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3290,7 +3290,7 @@ private String sanitizeId(Serializable id, String parameterName) {
32903290

32913291
private String sanitizePath(String branch) {
32923292
try {
3293-
return URLEncoder.encode(branch, "UTF-8");
3293+
return URLEncoder.encode(branch, "UTF-8").replaceAll("\\+", "%20");
32943294
} catch (UnsupportedEncodingException e) {
32953295
throw new RuntimeException((e));
32963296
}

0 commit comments

Comments
 (0)