File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
packages/signature-v4/src Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,18 @@ describe("getCanonicalHeaders", () => {
54
54
const headers : HeaderBag = {
55
55
"x-amz-user-agent" : "aws-sdk-js-v3" ,
56
56
host : "foo.us-east-1.amazonaws.com" ,
57
+ ":authority" : "" ,
57
58
} ;
58
59
59
- ( headers . foo as any ) = undefined ;
60
60
const request = new HttpRequest ( {
61
61
method : "POST" ,
62
62
protocol : "https:" ,
63
63
path : "/" ,
64
- headers,
64
+ headers : {
65
+ ...headers ,
66
+ foo : undefined ,
67
+ bar : null ,
68
+ } ,
65
69
hostname : "foo.us-east-1.amazonaws.com" ,
66
70
} ) ;
67
71
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const getCanonicalHeaders = (
12
12
) : HeaderBag => {
13
13
const canonical : HeaderBag = { } ;
14
14
for ( const headerName of Object . keys ( headers ) . sort ( ) ) {
15
- if ( ! headers [ headerName ] ) {
15
+ if ( headers [ headerName ] == undefined ) {
16
16
continue ;
17
17
}
18
18
You can’t perform that action at this time.
0 commit comments