Skip to content

Commit c164890

Browse files
committed
Fix "/" on query paths
1 parent 0452595 commit c164890

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/protocols/aws-query-protocol/src/main/java/software/amazon/awssdk/protocols/query/internal/marshall/QueryProtocolMarshaller.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ private QueryProtocolMarshaller(Builder builder) {
5151
}
5252

5353
private SdkHttpFullRequest.Builder fillBasicRequestParams(OperationInfo operationInfo) {
54+
String path = "";
55+
if (request.encodedPath() != null && !"/".equals(request.encodedPath())) {
56+
path = request.encodedPath();
57+
}
5458
return ProtocolUtils.createSdkHttpRequest(operationInfo, endpoint)
59+
.encodedPath(path)
5560
.putRawQueryParameter("Action", operationInfo.operationIdentifier())
5661
.putRawQueryParameter("Version", operationInfo.apiVersion());
5762
}

0 commit comments

Comments
 (0)