@@ -23,7 +23,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
2323 } ) ;
2424
2525 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 ( ) => {
2727 const handler = applyMd5BodyChecksumMiddleware ( {
2828 md5 : MockHash ,
2929 base64Encoder : mockEncoder ,
@@ -40,7 +40,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
4040
4141 expect ( next . mock . calls . length ) . toBe ( 1 ) ;
4242 const { request } = next . mock . calls [ 0 ] [ 0 ] ;
43- expect ( request . headers [ "Content-MD5 " ] ) . toBe ( "encoded" ) ;
43+ expect ( request . headers [ "content-md5 " ] ) . toBe ( "encoded" ) ;
4444 expect ( mockHashUpdate . mock . calls ) . toEqual ( [ [ body || "" ] ] ) ;
4545 } ) ;
4646
@@ -65,7 +65,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
6565 expect ( next . mock . calls . length ) . toBe ( 1 ) ;
6666 const { request } = next . mock . calls [ 0 ] [ 0 ] ;
6767 expect ( request . headers [ "CoNtEnT-Md5" ] ) . toBe ( "foo" ) ;
68- expect ( request . headers [ "Content-MD5 " ] ) . toBe ( undefined ) ;
68+ expect ( request . headers [ "content-md5 " ] ) . toBe ( undefined ) ;
6969 expect ( mockHashUpdate . mock . calls . length ) . toBe ( 0 ) ;
7070 expect ( mockHashDigest . mock . calls . length ) . toBe ( 0 ) ;
7171 expect ( mockEncoder . mock . calls . length ) . toBe ( 0 ) ;
@@ -90,7 +90,7 @@ describe("applyMd5BodyChecksumMiddleware", () => {
9090 expect ( next . mock . calls . length ) . toBe ( 1 ) ;
9191 const { request } = next . mock . calls [ 0 ] [ 0 ] ;
9292 expect ( request . body ) . toStrictEqual ( new ExoticStream ( ) ) ;
93- expect ( request . headers [ "Content-MD5 " ] ) . toBe ( "encoded" ) ;
93+ expect ( request . headers [ "content-md5 " ] ) . toBe ( "encoded" ) ;
9494 expect ( mockHashDigest . mock . calls . length ) . toBe ( 0 ) ;
9595 expect ( mockEncoder . mock . calls . length ) . toBe ( 1 ) ;
9696 expect ( mockEncoder . mock . calls ) . toEqual ( [ [ new Uint8Array ( 5 ) ] ] ) ;
0 commit comments