Skip to content

Remove ":" in Url.protocol? #8406

Closed
Closed
@maxis1718

Description

@maxis1718

Question: The protocol of an url http://a.b.c should be http or http:?

Observation: Given an url http://a.b.c, the following table shows the different parsing results of protocol among Node, Python and Java:

Node Python Java
http: http http

Note:

Current parsing logic: https://github.com/nodejs/node/blob/master/lib/url.js#L39

An example:

import URL from 'url';
let parsedUrl = URL.parse('http://a.b.c')

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    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