Skip to content

[Java][vertx] fix path param encoding #21403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class {{classname}}Impl implements {{classname}} {

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInf

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ public void testQueryParameterCollectionFormat(List<String> pipe, List<String> i

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testClassname(Client body, ApiClient.AuthInfo authInfo, Handler<Asyn

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, Strin

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void placeOrder(Order body, ApiClient.AuthInfo authInfo, Handler<AsyncRes

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public void updateUser(String username, User body, ApiClient.AuthInfo authInfo,

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void call123testSpecialTags(Client client, ApiClient.AuthInfo authInfo, H

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void fooGet(ApiClient.AuthInfo authInfo, Handler<AsyncResult<FooGetDefaul

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ public void testStringMapReference(Map<String, String> requestBody, ApiClient.Au

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testClassname(Client client, ApiClient.AuthInfo authInfo, Handler<As

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, Strin

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void placeOrder(Order order, ApiClient.AuthInfo authInfo, Handler<AsyncRe

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public void updateUser(String username, User user, ApiClient.AuthInfo authInfo,

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void call123testSpecialTags(Client client, ApiClient.AuthInfo authInfo, H

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void fooGet(ApiClient.AuthInfo authInfo, Handler<AsyncResult<FooGetDefaul

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ public void testStringMapReference(Map<String, String> requestBody, ApiClient.Au

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testClassname(Client client, ApiClient.AuthInfo authInfo, Handler<As

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, Strin

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void placeOrder(Order order, ApiClient.AuthInfo authInfo, Handler<AsyncRe

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public void updateUser(String username, User user, ApiClient.AuthInfo authInfo,

private String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name());
return URLEncoder.encode(parameter, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return parameter;
}
Expand Down
Loading