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

url: make WHATWG URL implementation more spec compliant #10317

Merged
merged 1 commit into from
Jan 1, 2017

Commits on Jan 1, 2017

  1. url: improve spec compliance of WHATWG URL

    This patch contains the following changes:
    
    url: make IPv4 parser more spec compliant
    
    * Return int64_t from ParseNumber to prevent overflow for valid big numbers
    * Don't throw when there are more than 4 parts (it cannot be an IP
    address)
    * Correctly interpret the address and don't always throw when there are
    numbers > 255
    
    Ref: https://url.spec.whatwg.org/#concept-ipv4-parser
    Fixes: nodejs#10306
    
    url: percent encode fragment to follow spec change
    
    Ref: whatwg/url#150
    Ref: whatwg/url@373dbed
    
    url: fix URL#search setter
    
    The check for empty string must be done before removing the leading '?'.
    
    Ref: https://url.spec.whatwg.org/#dom-url-search
    
    url: set port to null if an empty string is given
    
    This is to follow a spec change.
    
    Ref: whatwg/url#113
    
    url: fix parsing of paths with Windows drive letter
    
    test: update WHATWG URL test fixtures
    
    PR-URL: nodejs#10317
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    targos committed Jan 1, 2017
    Configuration menu
    Copy the full SHA
    db18dd8 View commit details
    Browse the repository at this point in the history