Skip to content

SocketAddress parses port 80 as 0 #62906

@ChALkeR

Description

@ChALkeR
Image

https://github.com/nodejs/node/blob/HEAD/lib/internal/socketaddress.js#L159

> net.SocketAddress.parse('127.0.0.1:81').port
81
> net.SocketAddress.parse('127.0.0.1:80').port
0

At least, this is very undocumented

Doc: https://nodejs.org/api/net.html#socketaddressparseinput

Metadata

Metadata

Assignees

No one assigned

    Labels

    netIssues and PRs related to the net subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions