Skip to content
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

fix(clients): allow empty string field values for headers #6511

Merged
merged 4 commits into from
Sep 24, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions clients/client-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
12 changes: 1 addition & 11 deletions clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,7 @@ export const se_UntagResourceCommand = async (
b.bp("/tags/{resourceArn}");
b.p("resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
[_tK]: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input[_tK]! || []).map((_entry) => _entry as any),
],
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK]! || []],
});
let body: any;
b.m("DELETE").h(headers).q(query).b(body);
Expand Down Expand Up @@ -2640,13 +2637,6 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);

const _aA = "analyzerArn";
const _cT = "clientToken";
const _iRP = "includeResourcePlaceholders";
Expand Down
14 changes: 7 additions & 7 deletions clients/client-account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
7 changes: 0 additions & 7 deletions clients/client-account/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,3 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
// Encode Uint8Array data into string with utf-8.
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
14 changes: 7 additions & 7 deletions clients/client-acm-pca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
14 changes: 7 additions & 7 deletions clients/client-acm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
14 changes: 7 additions & 7 deletions clients/client-amp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
12 changes: 1 addition & 11 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,7 @@ export const se_UntagResourceCommand = async (
b.bp("/tags/{resourceArn}");
b.p("resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
[_tK]: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input[_tK]! || []).map((_entry) => _entry as any),
],
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK]! || []],
});
let body: any;
b.m("DELETE").h(headers).q(query).b(body);
Expand Down Expand Up @@ -1629,13 +1626,6 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);

const _a = "alias";
const _cT = "clientToken";
const _mR = "maxResults";
Expand Down
14 changes: 7 additions & 7 deletions clients/client-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
12 changes: 1 addition & 11 deletions clients/client-amplify/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,10 +801,7 @@ export const se_UntagResourceCommand = async (
b.bp("/tags/{resourceArn}");
b.p("resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
[_tK]: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input[_tK]! || []).map((_entry) => _entry as any),
],
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK]! || []],
});
let body: any;
b.m("DELETE").h(headers).q(query).b(body);
Expand Down Expand Up @@ -2207,13 +2204,6 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);

const _eN = "environmentName";
const _mR = "maxResults";
const _nT = "nextToken";
Expand Down
14 changes: 7 additions & 7 deletions clients/client-amplifybackend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2462,10 +2462,3 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
// Encode Uint8Array data into string with utf-8.
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
14 changes: 7 additions & 7 deletions clients/client-amplifyuibuilder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^3.0.8",
"@smithy/core": "^2.4.3",
"@smithy/fetch-http-handler": "^3.2.7",
"@smithy/core": "^2.4.6",
"@smithy/fetch-http-handler": "^3.2.8",
"@smithy/hash-node": "^3.0.6",
"@smithy/invalid-dependency": "^3.0.6",
"@smithy/middleware-content-length": "^3.0.8",
"@smithy/middleware-endpoint": "^3.1.3",
"@smithy/middleware-retry": "^3.0.18",
"@smithy/middleware-retry": "^3.0.21",
"@smithy/middleware-serde": "^3.0.6",
"@smithy/middleware-stack": "^3.0.6",
"@smithy/node-config-provider": "^3.1.7",
"@smithy/node-http-handler": "^3.2.2",
"@smithy/node-http-handler": "^3.2.3",
"@smithy/protocol-http": "^4.1.3",
"@smithy/smithy-client": "^3.3.2",
"@smithy/smithy-client": "^3.3.5",
"@smithy/types": "^3.4.2",
"@smithy/url-parser": "^3.0.6",
"@smithy/util-base64": "^3.0.0",
"@smithy/util-body-length-browser": "^3.0.0",
"@smithy/util-body-length-node": "^3.0.0",
"@smithy/util-defaults-mode-browser": "^3.0.18",
"@smithy/util-defaults-mode-node": "^3.0.18",
"@smithy/util-defaults-mode-browser": "^3.0.21",
"@smithy/util-defaults-mode-node": "^3.0.21",
"@smithy/util-endpoints": "^2.1.2",
"@smithy/util-middleware": "^3.0.6",
"@smithy/util-retry": "^3.0.6",
Expand Down
12 changes: 1 addition & 11 deletions clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,7 @@ export const se_UntagResourceCommand = async (
b.bp("/tags/{resourceArn}");
b.p("resourceArn", () => input.resourceArn!, "{resourceArn}", false);
const query: any = map({
[_tK]: [
__expectNonNull(input.tagKeys, `tagKeys`) != null,
() => (input[_tK]! || []).map((_entry) => _entry as any),
],
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK]! || []],
});
let body: any;
b.m("DELETE").h(headers).q(query).b(body);
Expand Down Expand Up @@ -2738,13 +2735,6 @@ const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));

const isSerializableHeaderValue = (value: any): boolean =>
value !== undefined &&
value !== null &&
value !== "" &&
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);

const _cT = "clientToken";
const _mR = "maxResults";
const _nT = "nextToken";
Expand Down
Loading
Loading