Skip to content

net/http: client does not quote URL consistently like "protocol scheme" in returned errors #38421

Closed
@as

Description

@as

The HTTP client should quote the URL and protocol scheme consistently. Look at the result of this call to http.Get with an empty URL string:

fmt.Println(http.Get(""))
// <nil> Get : unsupported protocol scheme ""

I can't immediately see that there's an empty string in this output, I only see that the protocol is empty.

What did you expect to see?

<nil> Get "": unsupported protocol scheme ""

What did you see instead?

<nil> Get : unsupported protocol scheme ""

https://play.golang.org/p/ppBzVyfctb6

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions