@whatwg-node/node-fetch
Advanced tools
Comparing version 0.7.5 to 0.7.6-alpha-20241227033311-ca7fdf626b94113675ac448e53a702dbea85ab45
@@ -26,2 +26,7 @@ "use strict"; | ||
} | ||
if (url.includes(`${this.hostname}:`) && !this.port && this.pathname.startsWith('/:')) { | ||
this.port = this.pathname.slice(2); | ||
this.pathname = '/'; | ||
this.host = `${this.hostname}:${this.port}`; | ||
} | ||
if (base) { | ||
@@ -36,3 +41,3 @@ const baseParsed = typeof base === 'string' ? new PonyfillURL(base) : base; | ||
get origin() { | ||
return `${this.protocol}//${this.host}${this.port ? `:${this.port}` : ''}`; | ||
return `${this.protocol}//${this.hostname}${this.port ? `:${this.port}` : ''}`; | ||
} | ||
@@ -39,0 +44,0 @@ _searchParams; |
@@ -22,2 +22,7 @@ import { resolveObjectURL } from 'buffer'; | ||
} | ||
if (url.includes(`${this.hostname}:`) && !this.port && this.pathname.startsWith('/:')) { | ||
this.port = this.pathname.slice(2); | ||
this.pathname = '/'; | ||
this.host = `${this.hostname}:${this.port}`; | ||
} | ||
if (base) { | ||
@@ -32,3 +37,3 @@ const baseParsed = typeof base === 'string' ? new PonyfillURL(base) : base; | ||
get origin() { | ||
return `${this.protocol}//${this.host}${this.port ? `:${this.port}` : ''}`; | ||
return `${this.protocol}//${this.hostname}${this.port ? `:${this.port}` : ''}`; | ||
} | ||
@@ -35,0 +40,0 @@ _searchParams; |
{ | ||
"name": "@whatwg-node/node-fetch", | ||
"version": "0.7.5", | ||
"version": "0.7.6-alpha-20241227033311-ca7fdf626b94113675ac448e53a702dbea85ab45", | ||
"description": "Fetch API implementation for Node", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
235666
5980
28
67
18
260