-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix several serde issues with HTTP headers
This commit fixes casing comparison issues related to fetch for HTTP bindings of headers and prefix headers for both request and response. It also includes a fix to more robustly validate headers before serialization.
- Loading branch information
Showing
3 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ain/resources/software/amazon/smithy/typescript/codegen/integration/http-binding-utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function isSerializableHeaderValue(value: any): boolean { | ||
return value !== undefined | ||
&& value !== "" | ||
&& (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) | ||
&& (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); | ||
} |