Skip to content

Remove ":" in Url.protocol? #8406

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:',
  ...
}

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

    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