diff --git a/src/cdn/downloadUrlContents.ts b/src/cdn/downloadUrlContents.ts index d179d54..efe910a 100644 --- a/src/cdn/downloadUrlContents.ts +++ b/src/cdn/downloadUrlContents.ts @@ -24,7 +24,7 @@ export default function downloadUrlContents({ host, path, size }: {host: string, //Create HTTP request const request = http.request({ family: 4, - host, + hostname: host, path, }, saveResponse.bind(null, tempFileName, resolve, (reason: string) => { request.abort(); reject(reason); })); diff --git a/src/ssn/xdelta3/performDiffing.ts b/src/ssn/xdelta3/performDiffing.ts index 4feba87..f1c3e31 100644 --- a/src/ssn/xdelta3/performDiffing.ts +++ b/src/ssn/xdelta3/performDiffing.ts @@ -14,6 +14,10 @@ export default function performDiffing(sourceFile: string, diffStream: stream.Re reject(`Error during xdelta3: ${chunk}`); }); + process.on('error', (error) => { + reject(`Error during xdelta3: ${error}`); + }); + process.on('exit', (code, signal) => { if (code === 0) { resolve();