@whatwg-node/node-fetch 0.7.5-alpha-20241210191217-8a3d7a6a4e1f62f3693b7a618bbb8c6b5ff513f9 → 0.7.5-alpha-20241210210919-680ecc3291b1c6c284e87af6977d8a107e1ec8cc
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/cjs/fetchNodeHttp.js +2 -1
- package/esm/fetchNodeHttp.js +2 -1
- package/package.json +1 -1
package/cjs/fetchNodeHttp.js
CHANGED
@@ -33,7 +33,8 @@ function fetchNodeHttp(fetchRequest) {
|
|
33
33
|
nodeHeaders['accept-encoding'] = 'gzip, deflate, br';
|
34
34
|
}
|
35
35
|
let nodeRequest;
|
36
|
-
if (
|
36
|
+
// Skip using parsed URL if it's an IPv6 address (starting with brackets)
|
37
|
+
if (fetchRequest.parsedUrl && !fetchRequest.parsedUrl.hostname.startsWith('[')) {
|
37
38
|
nodeRequest = requestFn({
|
38
39
|
auth: fetchRequest.parsedUrl.username
|
39
40
|
? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
|
package/esm/fetchNodeHttp.js
CHANGED
@@ -30,7 +30,8 @@ export function fetchNodeHttp(fetchRequest) {
|
|
30
30
|
nodeHeaders['accept-encoding'] = 'gzip, deflate, br';
|
31
31
|
}
|
32
32
|
let nodeRequest;
|
33
|
-
if (
|
33
|
+
// Skip using parsed URL if it's an IPv6 address (starting with brackets)
|
34
|
+
if (fetchRequest.parsedUrl && !fetchRequest.parsedUrl.hostname.startsWith('[')) {
|
34
35
|
nodeRequest = requestFn({
|
35
36
|
auth: fetchRequest.parsedUrl.username
|
36
37
|
? `${fetchRequest.parsedUrl.username}:${fetchRequest.parsedUrl.password}`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/node-fetch",
|
3
|
-
"version": "0.7.5-alpha-
|
3
|
+
"version": "0.7.5-alpha-20241210210919-680ecc3291b1c6c284e87af6977d8a107e1ec8cc",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|