xjs-node 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -224,7 +224,7 @@ class HttpResolverContext {
|
|
|
224
224
|
const stream = fs.createWriteStream(dest);
|
|
225
225
|
res.pipe(stream);
|
|
226
226
|
stream.on("finish", () => stream.close());
|
|
227
|
-
stream.on("close", () => resolve({ headers: res.headers }));
|
|
227
|
+
stream.on("close", () => resolve({ headers: res.headers, status: res.statusCode }));
|
|
228
228
|
stream.on("error", e => this.handleError(reject, e, "an error occurred on donwloading stream."));
|
|
229
229
|
return;
|
|
230
230
|
}
|