@@ -23,7 +23,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
23
23
} ) ;
24
24
25
25
for ( const body of [ "body" , new ArrayBuffer ( 10 ) , new Uint8Array ( 10 ) , void 0 ] ) {
26
- it ( "should calculate the body hash, encode the result, and set the encoded hash to Content-MD5 header" , async ( ) => {
26
+ it ( "should calculate the body hash, encode the result, and set the encoded hash to content-md5 header" , async ( ) => {
27
27
const handler = applyMd5BodyChecksumMiddleware ( {
28
28
md5 : MockHash ,
29
29
base64Encoder : mockEncoder ,
@@ -40,7 +40,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
40
40
41
41
expect ( next . mock . calls . length ) . toBe ( 1 ) ;
42
42
const { request } = next . mock . calls [ 0 ] [ 0 ] ;
43
- expect ( request . headers [ "Content-MD5 " ] ) . toBe ( "encoded" ) ;
43
+ expect ( request . headers [ "content-md5 " ] ) . toBe ( "encoded" ) ;
44
44
expect ( mockHashUpdate . mock . calls ) . toEqual ( [ [ body || "" ] ] ) ;
45
45
} ) ;
46
46
@@ -65,7 +65,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
65
65
expect ( next . mock . calls . length ) . toBe ( 1 ) ;
66
66
const { request } = next . mock . calls [ 0 ] [ 0 ] ;
67
67
expect ( request . headers [ "CoNtEnT-Md5" ] ) . toBe ( "foo" ) ;
68
- expect ( request . headers [ "Content-MD5 " ] ) . toBe ( undefined ) ;
68
+ expect ( request . headers [ "content-md5 " ] ) . toBe ( undefined ) ;
69
69
expect ( mockHashUpdate . mock . calls . length ) . toBe ( 0 ) ;
70
70
expect ( mockHashDigest . mock . calls . length ) . toBe ( 0 ) ;
71
71
expect ( mockEncoder . mock . calls . length ) . toBe ( 0 ) ;
@@ -90,7 +90,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
90
90
expect ( next . mock . calls . length ) . toBe ( 1 ) ;
91
91
const { request } = next . mock . calls [ 0 ] [ 0 ] ;
92
92
expect ( request . body ) . toStrictEqual ( new ExoticStream ( ) ) ;
93
- expect ( request . headers [ "Content-MD5 " ] ) . toBe ( "encoded" ) ;
93
+ expect ( request . headers [ "content-md5 " ] ) . toBe ( "encoded" ) ;
94
94
expect ( mockHashDigest . mock . calls . length ) . toBe ( 0 ) ;
95
95
expect ( mockEncoder . mock . calls . length ) . toBe ( 1 ) ;
96
96
expect ( mockEncoder . mock . calls ) . toEqual ( [ [ new Uint8Array ( 5 ) ] ] ) ;
0 commit comments