From 564048dc2984c45884e5eb58c903f9a0ebe29ab4 Mon Sep 17 00:00:00 2001 From: Hackzzila Date: Tue, 24 Apr 2018 19:37:43 -0500 Subject: http,https,tls: switch to WHATWG URL parser This switches the url parser from `url.parse()` to the WHATWG URL parser while keeping `url.parse()` as fallback. Also add tests for invalid url deprecations and correct hostname checks. PR-URL: https://github.com/nodejs/node/pull/20270 Fixes: https://github.com/nodejs/node/issues/19468 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Daijiro Wachi Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- doc/api/https.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/api/https.md') diff --git a/doc/api/https.md b/doc/api/https.md index 3e7c2d95ad..89229ca621 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -119,7 +119,7 @@ changes: Like [`http.get()`][] but for HTTPS. `options` can be an object, a string, or a [`URL`][] object. If `options` is a -string, it is automatically parsed with [`url.parse()`][]. If it is a [`URL`][] +string, it is automatically parsed with [`new URL()`][]. If it is a [`URL`][] object, it will be automatically converted to an ordinary `options` object. Example: @@ -173,7 +173,7 @@ The following additional `options` from [`tls.connect()`][] are also accepted: `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext` `options` can be an object, a string, or a [`URL`][] object. If `options` is a -string, it is automatically parsed with [`url.parse()`][]. If it is a [`URL`][] +string, it is automatically parsed with [`new URL()`][]. If it is a [`URL`][] object, it will be automatically converted to an ordinary `options` object. Example: @@ -358,8 +358,8 @@ headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; p [`https.Agent`]: #https_class_https_agent [`https.request()`]: #https_https_request_options_callback [`net.Server`]: net.html#net_class_net_server +[`new URL()`]: url.html#url_constructor_new_url_input_base [`server.listen()`]: net.html#net_server_listen [`tls.connect()`]: tls.html#tls_tls_connect_options_callback [`tls.createSecureContext()`]: tls.html#tls_tls_createsecurecontext_options [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener -[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost -- cgit v1.2.3