55 getMaxVerificationVersion ,
66 getMinVerificationVersion ,
77 verifyRequestResponsePair ,
8- } from '@dfinity/response-verification/nodejs/nodejs.js ' ;
8+ } from '@dfinity/response-verification/dist/ nodejs/nodejs' ;
99import { IncomingMessage } from 'http' ;
1010import fetch from 'isomorphic-fetch' ;
1111import { inflate , ungzip } from 'pako' ;
@@ -87,6 +87,14 @@ export const fetchAsset = async ({
8787 // See TT-30.
8888 return ;
8989 }
90+
91+ if (
92+ key . toLowerCase ( ) === 'accept-encoding' &&
93+ ! value . includes ( 'identity' )
94+ ) {
95+ value = `${ value } , identity` ;
96+ }
97+
9098 requestHeaders . push ( [ key , value ] ) ;
9199 } ) ;
92100
@@ -345,6 +353,7 @@ export const fetchFromInternetComputer = async (
345353 headers : assetFetchResult . request . headers ,
346354 method : assetFetchResult . request . method ,
347355 url : assetFetchResult . request . url ,
356+ body : assetFetchResult . request . body ,
348357 } ,
349358 {
350359 statusCode : assetFetchResult . response . statusCode ,
@@ -358,7 +367,7 @@ export const fetchFromInternetComputer = async (
358367 minAllowedVerificationVersion
359368 ) ;
360369
361- if ( assetCertification . passed && assetCertification . response ) {
370+ if ( assetCertification . response ) {
362371 const certifiedResponseHeaders = fromResponseVerificationHeaders (
363372 assetCertification . response . headers
364373 ) ;
0 commit comments