Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: document, audit ProtocolError #17558

bradfitz opened this issue Oct 23, 2016 · 1 comment

net/http: document, audit ProtocolError #17558

bradfitz opened this issue Oct 23, 2016 · 1 comment


Copy link

@bradfitz bradfitz commented Oct 23, 2016 is a bit of an oddball.

It's used a little:

$ git grep ProtocolError
httputil/persist.go:    ErrPersistEOF = &http.ProtocolError{ErrorString: "persistent connection closed"}
httputil/persist.go:    ErrClosed     = &http.ProtocolError{ErrorString: "connection closed by user"}
httputil/persist.go:    ErrPipeline   = &http.ProtocolError{ErrorString: "pipeline error"}
request.go:type ProtocolError struct {
request.go:func (err *ProtocolError) Error() string { return err.ErrorString }
request.go:     ErrHeaderTooLong        = &ProtocolError{"header too long"}
request.go:     ErrShortBody            = &ProtocolError{"entity body too short"}
request.go:     ErrNotSupported         = &ProtocolError{"feature not supported"}
request.go:     ErrUnexpectedTrailer    = &ProtocolError{"trailer header without chunked transfer encoding"}
request.go:     ErrMissingContentLength = &ProtocolError{"missing ContentLength in HEAD response"}
request.go:     ErrNotMultipart         = &ProtocolError{"request Content-Type isn't multipart/form-data"}
request.go:     ErrMissingBoundary      = &ProtocolError{"no multipart boundary param in Content-Type"}

Should it be used more? Are those error variables even used?

Check. If ProtocolError isn't consistently used and we don't want to make it so, document that it's not always used.

@bradfitz bradfitz added this to the Go1.8Maybe milestone Oct 23, 2016
@bradfitz bradfitz self-assigned this Oct 23, 2016
Copy link

@gopherbot gopherbot commented Nov 10, 2016

CL mentions this issue.

@gopherbot gopherbot closed this in 63224ca Nov 10, 2016
@golang golang locked and limited conversation to collaborators Nov 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.