Skip to content

net/url: no way to construct raw unqualified request URI starting with // #10433

@DanielMorsing

Description

@DanielMorsing

http://play.golang.org/p/67oKm8TFcm

When I pass the URL in the playground into the http transport, it will call .RequestURI() and do a GET http://foo/bar%2f, while what I actually wanted was GET //foo/bar%2f. It looks like there is no possible way to construct a URL that will query for //foo/bar%2f.

Not quite sure how to distinguish between the case of Opaque containing a qualified URI and an unqualified one starting with //. Does it make sense to look at the host part after the // and see if it matches what's in Host?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions