-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
(v7.x backport) url: updates to the WHATWG URL parser #12507
Commits on Apr 25, 2017
-
url: extend URLSearchParams constructor
PR-URL: nodejs#12507 Fixes: nodejs#10635 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 71d3f94 - Browse repository at this point
Copy the full SHA 71d3f94View commit details -
doc: document URLSearchParams constructor
PR-URL: nodejs#12507 Ref: whatwg/url#175 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c40a45f - Browse repository at this point
Copy the full SHA c40a45fView commit details -
url: enforce valid UTF-8 in WHATWG parser
This commit implements the Web IDL USVString conversion, which mandates all unpaired Unicode surrogates be turned into U+FFFD REPLACEMENT CHARACTER. It also disallows Symbols to be used as USVString per spec. Certain functions call into C++ methods in the binding that use the Utf8Value class to access string arguments. Utf8Value already does the normalization using V8's String::Write, so in those cases, instead of doing the full USVString normalization, only a symbol check is done (`'' + val`, which uses ES's ToString, versus `String()` which has special provisions for symbols). PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b0fecbe - Browse repository at this point
Copy the full SHA b0fecbeView commit details -
url: prioritize toString when stringifying
The ES addition operator calls the ToPrimitive() abstract operation without hint String, leading a subsequent OrdinaryToPrimitive() to call valueOf() first on an object rather than the desired toString(). Instead, use template literals which directly call ToString() abstract operation, per Web IDL spec. PR-URL: nodejs#12507 Fixes: b610a4d "url: enforce valid UTF-8 in WHATWG parser" Refs: nodejs@b610a4d#commitcomment-21200056 Refs: https://tc39.github.io/ecma262/#sec-addition-operator-plus-runtime-semantics-evaluation Refs: https://tc39.github.io/ecma262/#sec-template-literals-runtime-semantics-evaluation Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c3366a5 - Browse repository at this point
Copy the full SHA c3366a5View commit details -
url: spec-compliant URLSearchParams serializer
PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6b2cb6d - Browse repository at this point
Copy the full SHA 6b2cb6dView commit details -
src: remove explicit UTF-8 validity check in url
This step was never part of the URL Standard's host parser algorithm, and is rendered unnecessary after IDNA errors are no longer ignored. PR-URL: nodejs#12507 Refs: c2a302c "src: do not ignore IDNA conversion error" Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7e7fd66 - Browse repository at this point
Copy the full SHA 7e7fd66View commit details -
querystring: move isHexTable to internal
PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4a94c2d - Browse repository at this point
Copy the full SHA 4a94c2dView commit details -
url: spec-compliant URLSearchParams parser
The entire `URLSearchParams` class is now fully spec-compliant. PR-URL: nodejs#12507 Fixes: nodejs#10821 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d86f0d7 - Browse repository at this point
Copy the full SHA d86f0d7View commit details -
url: use a class for WHATWG url[context]
The object is used as a structure, not as a map, which `StorageObject` was designed for. PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a2a3d6c - Browse repository at this point
Copy the full SHA a2a3d6cView commit details -
url: add ToObject method to native URL class
Provides a factory method to convert a native URL class into a JS URL object. ```c++ Environment* env = ... URL url("http://example.org/a/b/c?query#fragment"); MaybeLocal<Value> val = url.ToObject(env); ``` PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 75ef213 - Browse repository at this point
Copy the full SHA 75ef213View commit details -
src: WHATWG URL C++ parser cleanup
- Clarify port state - Remove scheme flag - Clarify URL_FLAG_TERMINATED PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5b7b775 - Browse repository at this point
Copy the full SHA 5b7b775View commit details -
url: change path parsing for non-special URLs
This changes to the way path parsing for non-special URLs. It allows paths to be empty for non-special URLs and also takes that into account when serializing. PR-URL: nodejs#12507 Fixes: nodejs#11962 Refs: whatwg/url#213 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d912e28 - Browse repository at this point
Copy the full SHA d912e28View commit details -
test: synchronize WPT url test data
PR-URL: nodejs#12507 Refs: web-platform-tests/wpt#4586 Refs: nodejs#11887 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dceb12e - Browse repository at this point
Copy the full SHA dceb12eView commit details -
url: error when domainTo*() is called w/o argument
PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 43faf56 - Browse repository at this point
Copy the full SHA 43faf56View commit details -
url: avoid instanceof for WHATWG URL
PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dafa600 - Browse repository at this point
Copy the full SHA dafa600View commit details -
url: trim leading slashes of file URL paths
It should trim the slashes after the colon into three for file URL. PR-URL: nodejs#12507 Refs: web-platform-tests/wpt#5195 Fixes: nodejs#11188 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 68cf850 - Browse repository at this point
Copy the full SHA 68cf850View commit details -
url: remove javascript URL special case
PR-URL: nodejs#12507 Fixes: nodejs#11485 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 752097c - Browse repository at this point
Copy the full SHA 752097cView commit details -
url: disallow invalid IPv4 in IPv6 parser
PR-URL: nodejs#12507 Fixes: nodejs#10655 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f484cfd - Browse repository at this point
Copy the full SHA f484cfdView commit details -
url: clean up WHATWG URL origin generation
- Use ordinary properties instead of symbols/getter redirection for internal object - Use template string literals - Remove unneeded custom inspection for internal objects - Remove unneeded OpaqueOrigin class - Remove unneeded type checks PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9288b73 - Browse repository at this point
Copy the full SHA 9288b73View commit details -
url: improve WHATWG URL inspection
PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8f702ef - Browse repository at this point
Copy the full SHA 8f702efView commit details -
src: clean up WHATWG WG parser
* reduce indentation * refactor URL inlined methods * prefer templates over macros * do not export ARG_* flags in url binding PR-URL: nodejs#12507 Reviewed-By: James M Snell <jasnell@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 473bd5e - Browse repository at this point
Copy the full SHA 473bd5eView commit details