Skip to content

Parsed URL objects have a colon in protocol field. #3176

Description

@wsmd

When I try to parse a url using url.parse(), the protocol has a colon at the end.

Example

The following command

url.parse("https://avatars3.githubusercontent.com/u/2100222")

returns

Url {
  protocol: 'https:',
  ...
}

Shouldn't the protocol be http instead of http:? If not, what's the point of having it included?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues asking questions about Node.js.urlIssues and PRs related to the legacy built-in url module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions