Skip to content

net/http: document how to create client CONNECT requests #22554

Closed
@Audrey-Randall

Description

@Audrey-Randall

What version of Go are you using (go version)?

Go1.9

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

windows/amd64

What did you do?

This error is reproducible at https://play.golang.org/p/9m7rlnqsTm

I attempted to create a new HTTP request with http.NewRequest() using a URI that starts with a number, with no protocol, that also contains a port:
_, err = http.NewRequest(http.MethodConnect, "0.docs.google.com:443", nil)

What did you expect to see?

The request should be created with no error.

What did you see instead?

I get the error "parse : first path segment in URL cannot contain colon"

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions