@whatwg-node/node-fetch 0.7.6-alpha-20241227121147-763fdcdb05c03c53dd7b4355afa76c3478f791ce → 0.7.6-alpha-20241227121605-8911b685bebd9f2198f82c42c90726a4d70a56d7
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/URL.js +2 -0
- package/esm/URL.js +2 -0
- package/package.json +1 -1
package/cjs/URL.js
CHANGED
@@ -23,6 +23,8 @@ class PonyfillURL extends fast_url_parser_1.default {
|
|
23
23
|
IPV6_REGEX.test(this.hostname)) {
|
24
24
|
this.hostname = `[${this.hostname}]`;
|
25
25
|
}
|
26
|
+
// `fast-url-parser` incorrectly handle URLs with ports without pathnames correctly like
|
27
|
+
// `http://localhost:8080?foo=bar` -> `http://localhost/:8080?foo=bar`
|
26
28
|
if (url.includes(`${this.hostname}:`) && !this.port && this.pathname.startsWith('/:')) {
|
27
29
|
this.port = this.pathname.slice(2);
|
28
30
|
this.pathname = '/';
|
package/esm/URL.js
CHANGED
@@ -19,6 +19,8 @@ export class PonyfillURL extends FastUrl {
|
|
19
19
|
IPV6_REGEX.test(this.hostname)) {
|
20
20
|
this.hostname = `[${this.hostname}]`;
|
21
21
|
}
|
22
|
+
// `fast-url-parser` incorrectly handle URLs with ports without pathnames correctly like
|
23
|
+
// `http://localhost:8080?foo=bar` -> `http://localhost/:8080?foo=bar`
|
22
24
|
if (url.includes(`${this.hostname}:`) && !this.port && this.pathname.startsWith('/:')) {
|
23
25
|
this.port = this.pathname.slice(2);
|
24
26
|
this.pathname = '/';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/node-fetch",
|
3
|
-
"version": "0.7.6-alpha-
|
3
|
+
"version": "0.7.6-alpha-20241227121605-8911b685bebd9f2198f82c42c90726a4d70a56d7",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|