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: https://github.com/nodejs/node/issues/10306 url: percent encode fragment to follow spec change Ref: https://github.com/whatwg/url/issues/150 Ref: https://github.com/whatwg/url/commit/373dbedbbf0596f723ce8a195923da98b698aeb0 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: https://github.com/whatwg/url/pull/113 url: fix parsing of paths with Windows drive letter test: update WHATWG URL test fixtures PR-URL: https://github.com/nodejs/node/pull/10317 Reviewed-By:James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com>
parent
ee9df357
Please register or sign in to comment