DEP0170: Invalid port when using url.parse()


类型: 仅文档

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

Type: Documentation-only

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.