- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33.7k
 
docs: state decoding behavior for url pathname #1731
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
Conversation
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
        
          
                doc/api/url.markdown
              
                Outdated
          
        
      There was a problem hiding this comment.
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'.
| 
           Looking good, except the typo. I think it's unnecessary to add it to   | 
    
        
          
                doc/api/url.markdown
              
                Outdated
          
        
      There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
{ '&': '' }There was a problem hiding this comment.
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.
| 
           @silverwind removed the   | 
    
| 
           Thanks, landed in a74c2c9  | 
    
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 <me@silverwind.io>
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.ServerIncomingMessagesdocumentation as mentioned in the issue?Fixes #1538