urllib 3.19.2 → 3.19.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/README.md +1 -1
- package/dist/commonjs/HttpClient.js +3 -2
- package/dist/esm/HttpClient.js +3 -2
- package/package.json +1 -1
- package/src/HttpClient.ts +2 -1
package/README.md
CHANGED
@@ -73,7 +73,7 @@ class HttpClientRequestTimeoutError extends Error {
|
|
73
73
|
Error.captureStackTrace(this, this.constructor);
|
74
74
|
}
|
75
75
|
}
|
76
|
-
exports.HEADER_USER_AGENT = (0, default_user_agent_1.default)('node-urllib', '3.19.
|
76
|
+
exports.HEADER_USER_AGENT = (0, default_user_agent_1.default)('node-urllib', '3.19.3');
|
77
77
|
function getFileName(stream) {
|
78
78
|
const filePath = stream.path;
|
79
79
|
if (filePath) {
|
@@ -126,7 +126,8 @@ class HttpClient extends node_events_1.EventEmitter {
|
|
126
126
|
requestUrl = new URL((0, node_url_1.format)(url));
|
127
127
|
}
|
128
128
|
else {
|
129
|
-
|
129
|
+
// or even if not, we clone to avoid mutating it
|
130
|
+
requestUrl = new URL(url.toString());
|
130
131
|
}
|
131
132
|
}
|
132
133
|
const method = (options?.method ?? 'GET').toUpperCase();
|
package/dist/esm/HttpClient.js
CHANGED
@@ -67,7 +67,7 @@ class HttpClientRequestTimeoutError extends Error {
|
|
67
67
|
Error.captureStackTrace(this, this.constructor);
|
68
68
|
}
|
69
69
|
}
|
70
|
-
export const HEADER_USER_AGENT = createUserAgent('node-urllib', '3.19.
|
70
|
+
export const HEADER_USER_AGENT = createUserAgent('node-urllib', '3.19.3');
|
71
71
|
function getFileName(stream) {
|
72
72
|
const filePath = stream.path;
|
73
73
|
if (filePath) {
|
@@ -120,7 +120,8 @@ export class HttpClient extends EventEmitter {
|
|
120
120
|
requestUrl = new URL(urlFormat(url));
|
121
121
|
}
|
122
122
|
else {
|
123
|
-
|
123
|
+
// or even if not, we clone to avoid mutating it
|
124
|
+
requestUrl = new URL(url.toString());
|
124
125
|
}
|
125
126
|
}
|
126
127
|
const method = (options?.method ?? 'GET').toUpperCase();
|
package/package.json
CHANGED
package/src/HttpClient.ts
CHANGED
@@ -201,7 +201,8 @@ export class HttpClient extends EventEmitter {
|
|
201
201
|
// url maybe url.parse(url) object in urllib2
|
202
202
|
requestUrl = new URL(urlFormat(url));
|
203
203
|
} else {
|
204
|
-
|
204
|
+
// or even if not, we clone to avoid mutating it
|
205
|
+
requestUrl = new URL(url.toString());
|
205
206
|
}
|
206
207
|
}
|
207
208
|
|