DEP0170:使用 url.parse() 时端口无效


¥DEP0170: Invalid port when using url.parse()

类型:运行时

¥Type: Runtime

url.parse() 接受端口不是数字的 URL。此行为可能会导致使用意外输入进行主机名欺骗。这些 URL 将在未来版本的 Node.js 中抛出错误,就像 WHATWG URL API 已经做的那样。

¥url.parse() accepts URLs with ports that are not numbers. This behavior might result in host name spoofing with unexpected input. These URLs will throw an error in future versions of Node.js, as the WHATWG URL API does already.