Skip to content

net/http: add ErrSchemeMismatch #44855

Closed
Closed
@AkihiroSuda

Description

@AkihiroSuda

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

$ go version
go version go1.16 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you expect to see?

I'd like to see the http: server gave HTTP response to HTTPS client error in the net/http package to be exposed as a constant that can be compared with errors.Is

err = errors.New("http: server gave HTTP response to HTTPS client")

Context

I'm working on a clone of Docker called nerdctl (contaiNERD ctl).
I want to compare http: server gave HTTP response to HTTPS client with errors.Is, for ease of reimplementing dockerd --insecure-registries, which attempts HTTPS first and then falls back to HTTP.

What did you see instead?

The http: server gave HTTP response to HTTPS client error is not exposed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions