Skip to content

Commit 3b67aec

Browse files
committed
Revert behavior change in query when request path is set - remove failing protocol tests - avoid behavior changes in this PR
1 parent e8fa838 commit 3b67aec

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

.changes/next-release/bugfix-AWSQueryProtocol-3bb558c.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

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

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

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

test/protocol-tests-core/src/main/resources/software/amazon/awssdk/protocol/suites/cases/query-input.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -80,27 +80,6 @@
8080
}
8181
}
8282
},
83-
{
84-
"id": "QueryHostWithPath",
85-
"description": "Custom endpoints supplied by users can have paths",
86-
"given": {
87-
"input": {},
88-
"host": "example.com/custom"
89-
},
90-
"when": {
91-
"action": "marshall",
92-
"operation": "HostWithPathOperation"
93-
},
94-
"then": {
95-
"serializedAs": {
96-
"method": "POST",
97-
"body": {
98-
"queryEquals": "Action=HostWithPathOperation&Version=2020-01-08"
99-
},
100-
"uri": "/custom/"
101-
}
102-
}
103-
},
10483
{
10584
"id": "NestedStructures",
10685
"description": "Serializes nested structures using dots",

0 commit comments

Comments
 (0)