urllib 2.37.2 → 2.37.3
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.
- package/History.md +6 -0
- package/lib/urllib.js +6 -7
- package/package.json +1 -1
package/History.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
|
2
|
+
2.37.3 / 2021-07-05
|
3
|
+
==================
|
4
|
+
|
5
|
+
**fixes**
|
6
|
+
* [[`b730a6c`](http://github.com/node-modules/urllib/commit/b730a6cdc0465bea1c08d50bfa3b5e95bd17b31f)] - fix: 🐛 redirect status code (#363) (Hongcai Deng <<admin@dhchouse.com>>)
|
7
|
+
|
2
8
|
2.37.2 / 2021-06-07
|
3
9
|
==================
|
4
10
|
|
package/lib/urllib.js
CHANGED
@@ -602,15 +602,14 @@ function requestWithCallback(url, args, callback) {
|
|
602
602
|
timing.contentDownload = requestUseTime;
|
603
603
|
}
|
604
604
|
|
605
|
-
var headers = {};
|
606
|
-
|
607
|
-
|
608
|
-
}
|
605
|
+
var headers = res && res.headers || {};
|
606
|
+
var resStatusCode = res && res.statusCode || statusCode;
|
607
|
+
var resStatusMessage = res && res.statusMessage || statusMessage;
|
609
608
|
|
610
609
|
return {
|
611
|
-
status:
|
612
|
-
statusCode:
|
613
|
-
statusMessage:
|
610
|
+
status: resStatusCode,
|
611
|
+
statusCode: resStatusCode,
|
612
|
+
statusMessage: resStatusMessage,
|
614
613
|
headers: headers,
|
615
614
|
size: responseSize,
|
616
615
|
aborted: responseAborted,
|