Skip to content

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

Closed
@wsmd

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues that look for answers.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