Skip to content

Commit 480be03

Browse files
authored
Fix empty string/list headers protocol tests (#2403)
* serialize empty strings and lists to headers in restXml and restJson1 * undo build.gradle change
1 parent 7813acb commit 480be03

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

smithy-aws-protocol-tests/model/restJson1/http-headers.smithy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,15 @@ operation NullAndEmptyHeadersClient {
424424
apply NullAndEmptyHeadersClient @httpRequestTests([
425425
{
426426
id: "RestJsonNullAndEmptyHeaders",
427-
documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
427+
documentation: "Do not send null values, but do send empty strings and empty lists over the wire in headers",
428428
protocol: restJson1,
429429
method: "GET",
430430
uri: "/NullAndEmptyHeadersClient",
431-
forbidHeaders: ["X-A", "X-B", "X-C"],
431+
forbidHeaders: ["X-A"],
432+
headers: {
433+
"X-B": ""
434+
"X-C": ""
435+
}
432436
body: "",
433437
params: {
434438
a: null,

smithy-aws-protocol-tests/model/restXml/http-headers.smithy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,15 @@ operation NullAndEmptyHeadersClient {
367367
apply NullAndEmptyHeadersClient @httpRequestTests([
368368
{
369369
id: "NullAndEmptyHeaders",
370-
documentation: "Do not send null values, empty strings, or empty lists over the wire in headers",
370+
documentation: "Do not send null values, but do send empty strings and empty lists over the wire in headers",
371371
protocol: restXml,
372372
method: "GET",
373373
uri: "/NullAndEmptyHeadersClient",
374-
forbidHeaders: ["X-A", "X-B", "X-C"],
374+
forbidHeaders: ["X-A"],
375+
headers: {
376+
"X-B": ""
377+
"X-C": ""
378+
}
375379
body: "",
376380
params: {
377381
a: null,

0 commit comments

Comments
 (0)