Skip to content

Conversation

joshgummersall
Copy link

Explicitly states the fact that no decoding is performed on the url
path or pathname or the query string by default in the URL module.

@Fishrock123 should I also include a similar change in the Http.Server IncomingMessages documentation as mentioned in the issue?

Fixes #1538

Explicitly states the fact that no decoding is performed on the url
path or pathname or the query string by default in the URL module.

Fixes #1538
@mscdex mscdex added the doc Issues and PRs related to the documentations. label May 19, 2015
@silverwind silverwind added the url Issues and PRs related to the legacy built-in url module. label May 19, 2015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the superfluous 'the ' before 'neither'.

@silverwind
Copy link
Contributor

Looking good, except the typo. I think it's unnecessary to add it to http too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By looking at the code I'm not really sure search is parsed at all?

Not too familiar with url code though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, it looks like only query is decoded:

> url.parse('http://foo.com/?%26', true).search
'?%26'
> url.parse('http://foo.com/?%26', true).query
{ '&': '' }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, query is the decoded from the search field.

@joshgummersall
Copy link
Author

@silverwind removed the search piece and fixed the grammar of the docs. Will not add anything to the http documentation.

silverwind pushed a commit that referenced this pull request May 25, 2015
Explicitly states the fact that no decoding is performed on the url
path or pathname or the query string by default in the URL module.

Fixes: #1538
PR-URL: #1731
Reviewed-By: Roman Reiss <[email protected]>
@silverwind
Copy link
Contributor

Thanks, landed in a74c2c9

@silverwind silverwind closed this May 25, 2015
@joshgummersall joshgummersall deleted the fix-url-parsing-docs branch May 25, 2015 21:17
This was referenced May 27, 2015
andrewdeandrade pushed a commit to andrewdeandrade/node that referenced this pull request Jun 3, 2015
Explicitly states the fact that no decoding is performed on the url
path or pathname or the query string by default in the URL module.

Fixes: nodejs/node#1538
PR-URL: nodejs/node#1731
Reviewed-By: Roman Reiss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: state behavior for url pathname and percent encoding
4 participants