Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improperly parsed hash in URLs with port #42

Closed
innocenzi opened this issue Feb 25, 2022 · 0 comments
Closed

Improperly parsed hash in URLs with port #42

innocenzi opened this issue Feb 25, 2022 · 0 comments

Comments

@innocenzi
Copy link

innocenzi commented Feb 25, 2022

Hey,

Parsing an URL with a port and a hash without a slash in-between results in an improperly parsed URL, where hash is empty and host contains the hash.

Also, shouldn't there be an entry fort port?

Reproduction

Input: parseURL('https://domain.test:3000#owo')
Current output:

{
  protocol: 'https:',
  auth: '',
  host: 'domain.test:3000#owo',
  pathname: '',
  search: '',
  hash: ''
}

Expected output:

{
  protocol: 'https:',
  auth: '',
  host: 'domain.test:3000',
  pathname: '',
  search: '',
  hash: '#owo'
}
@pi0 pi0 closed this as completed in 53a1cea Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant