Skip to content

proposal: net/url: (*Userinfo).Username function should return bool value alongside with string #66838

@otaxhu

Description

@otaxhu

Proposal Details

I'm not an expert of the RFC documents for urls, I would like to know if the following urls are valid:

  1. This is supposed to have a empty username and empty password (totally different from null username or password)
https://:@domain.com
  1. This is supposed to have empty username and null password
https://@domain.com
  1. This have both username and password null.
https://domain.com

If the second and third statements are true, then Userinfo functions Username and Password should have a mechanism in which should notify to the caller that this values are empty or null.

Password function already returns a bool value indicating presence or nullness of that field. I would like to know if it's correct to have Username function to return the same :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions