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

Error parsing specific URI #190

Closed
SunilAgrawal opened this Issue Feb 24, 2015 · 4 comments

Comments

Projects
None yet
2 participants

rodneyrehm added a commit that referenced this issue Feb 24, 2015

@SunilAgrawal

This comment has been minimized.

Show comment
Hide comment
@SunilAgrawal

SunilAgrawal Feb 24, 2015

Shouldn't the hostname only have the name of the host, and the port number
have '443'? Why is the port number null?

On Tue, Feb 24, 2015 at 3:12 PM, Rodney Rehm notifications@github.com
wrote:

I'm not sure I can reproduce your problem, as the following looks good to
me. What's your code look like?

var s = 'https://moe.linkedinlabs.com:443/pal2/v1/people::(email=XXX@XXX.example.com):public:(id,first-name,last-name,distance,picture-url,site-standard-profile-request,headline,industry,LOCATION:(name),three-current-positions:(title,company:(id,name)))?trk=MOE&ver=16&escape=html&_=1424816267333';var u = URI(s);
console.log(JSON.stringify(u.parts, null, 2));// prints
{
"protocol": "https",
"username": null,
"password": null,
"hostname": "moe.linkedinlabs.com:443",
"urn": null,
"port": null,
"path": "/pal2/v1/people::(email=XXX@XXX.example.com):public:(id,first-name,last-name,distance,picture-url,site-standard-profile-request,headline,industry,LOCATION:(name),three-current-positions:(title,company:(id,name)))",
"query": "trk=MOE&ver=16&escape=html&
=1424816267333",
"fragment": null,
"duplicateQueryParameters": false,
"escapeQuerySpace": true
}
console.log(u.hostname());//prints:"moe.linkedinlabs.com:443"


Reply to this email directly or view it on GitHub
#190 (comment).

Shouldn't the hostname only have the name of the host, and the port number
have '443'? Why is the port number null?

On Tue, Feb 24, 2015 at 3:12 PM, Rodney Rehm notifications@github.com
wrote:

I'm not sure I can reproduce your problem, as the following looks good to
me. What's your code look like?

var s = 'https://moe.linkedinlabs.com:443/pal2/v1/people::(email=XXX@XXX.example.com):public:(id,first-name,last-name,distance,picture-url,site-standard-profile-request,headline,industry,LOCATION:(name),three-current-positions:(title,company:(id,name)))?trk=MOE&ver=16&escape=html&_=1424816267333';var u = URI(s);
console.log(JSON.stringify(u.parts, null, 2));// prints
{
"protocol": "https",
"username": null,
"password": null,
"hostname": "moe.linkedinlabs.com:443",
"urn": null,
"port": null,
"path": "/pal2/v1/people::(email=XXX@XXX.example.com):public:(id,first-name,last-name,distance,picture-url,site-standard-profile-request,headline,industry,LOCATION:(name),three-current-positions:(title,company:(id,name)))",
"query": "trk=MOE&ver=16&escape=html&
=1424816267333",
"fragment": null,
"duplicateQueryParameters": false,
"escapeQuerySpace": true
}
console.log(u.hostname());//prints:"moe.linkedinlabs.com:443"


Reply to this email directly or view it on GitHub
#190 (comment).

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Feb 24, 2015

Member

good catch! fixed in master.

Member

rodneyrehm commented Feb 24, 2015

good catch! fixed in master.

@rodneyrehm rodneyrehm closed this Feb 24, 2015

@rodneyrehm rodneyrehm added the Bug label Feb 24, 2015

@SunilAgrawal

This comment has been minimized.

Show comment
Hide comment
@SunilAgrawal

SunilAgrawal Feb 25, 2015

When will this make the mainline? I usually use the online build tool to get a custom build of URI.js.

When will this make the mainline? I usually use the online build tool to get a custom build of URI.js.

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Feb 25, 2015

Member

When will this make the mainline?

now: v1.14.2

Member

rodneyrehm commented Feb 25, 2015

When will this make the mainline?

now: v1.14.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment