-
Notifications
You must be signed in to change notification settings - Fork 43
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
Port number gets prepended with double slashes #39
Comments
It used to, this is a bug |
Hi Jose
Appreciate the quick reply .
Curious to know if a fix would be provided ?
…On Wed, Apr 4, 2018 at 6:20 PM, José F. Romaniello ***@***.*** > wrote:
It used to, this is a bug
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkTiWWC_FK6ITN9vq_f3tye6Oja5vCAIks5tlMGwgaJpZM4TGc97>
.
|
Actually, I am not sure now if we should fix it. For instance
In other words A solution will be to prepend the protocol:
|
Thanks appreciate the "quick" help :)
…On Wed, Apr 4, 2018 at 8:05 PM, José F. Romaniello ***@***.*** > wrote:
Actually, I am not sure now if we should fix it. For instance url.parse
assumes here that 127.0.0.1 is the protocol:
> url.parse('127.0.0.1:23')
Url {
protocol: '127.0.0.1:',
slashes: null,
auth: null,
host: '23',
port: null,
hostname: '23',
hash: null,
search: null,
query: null,
pathname: null,
path: null,
href: '127.0.0.1:23' }
In other words url-join is as broken as url.parse currently.
A solution will be to prepend the protocol:
> urljoin('http://127.0.0.1:5500' , 'data', 'myfile1.csv');
'http://127.0.0.1:5500/data/myfile1.csv'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkTiWbtKlGJhRRSvtGV5cX1Hlnoble1iks5tlNobgaJpZM4TGc97>
.
|
@jfromaniello thanks for the solution but it would be nice if we should add this work around in the document. I got this issue when I was working on a local development. Thanks. |
Hi
When using this library
If i try urljoin('127.0.0.1:5500' , 'data', 'myfile1.csv');
The output i get is
127.0.0.1://5500/data/myfil1.csv
But the output i am expecting is
127.0.0.1:5500/data/myfil1.csv
Can the library take care of this ?
The text was updated successfully, but these errors were encountered: