Skip to content

Commit

Permalink
Fix empty string/list headers protocol tests (#2403)
Browse files Browse the repository at this point in the history
* serialize empty strings and lists to headers in restXml and restJson1

* undo build.gradle change
  • Loading branch information
kuhe authored Sep 23, 2024
1 parent 7813acb commit 480be03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions smithy-aws-protocol-tests/model/restJson1/http-headers.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,15 @@ operation NullAndEmptyHeadersClient {
apply NullAndEmptyHeadersClient @httpRequestTests([
{
id: "RestJsonNullAndEmptyHeaders",
documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
documentation: "Do not send null values, but do send empty strings and empty lists over the wire in headers",
protocol: restJson1,
method: "GET",
uri: "/NullAndEmptyHeadersClient",
forbidHeaders: ["X-A", "X-B", "X-C"],
forbidHeaders: ["X-A"],
headers: {
"X-B": ""
"X-C": ""
}
body: "",
params: {
a: null,
Expand Down
8 changes: 6 additions & 2 deletions smithy-aws-protocol-tests/model/restXml/http-headers.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,15 @@ operation NullAndEmptyHeadersClient {
apply NullAndEmptyHeadersClient @httpRequestTests([
{
id: "NullAndEmptyHeaders",
documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
documentation: "Do not send null values, but do send empty strings and empty lists over the wire in headers",
protocol: restXml,
method: "GET",
uri: "/NullAndEmptyHeadersClient",
forbidHeaders: ["X-A", "X-B", "X-C"],
forbidHeaders: ["X-A"],
headers: {
"X-B": ""
"X-C": ""
}
body: "",
params: {
a: null,
Expand Down

0 comments on commit 480be03

Please sign in to comment.