mirror of
https://github.com/golang/go
synced 2024-11-25 09:07:58 -07:00
http: rename ErrBodyReadAferClose to ErrBodyReadAfterClose
R=bradfitz, dsymonds CC=golang-dev https://golang.org/cl/4432085
This commit is contained in:
parent
27d0a731a2
commit
89adf5dce4
@ -442,15 +442,15 @@ type body struct {
|
|||||||
closed bool
|
closed bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrBodyReadAferClose is returned when reading a Request Body after
|
// ErrBodyReadAfterClose is returned when reading a Request Body after
|
||||||
// the body has been closed. This typically happens when the body is
|
// the body has been closed. This typically happens when the body is
|
||||||
// read after an HTTP Handler calls WriteHeader or Write on its
|
// read after an HTTP Handler calls WriteHeader or Write on its
|
||||||
// ResponseWriter.
|
// ResponseWriter.
|
||||||
var ErrBodyReadAferClose = os.NewError("http: invalid Read on closed request Body")
|
var ErrBodyReadAfterClose = os.NewError("http: invalid Read on closed request Body")
|
||||||
|
|
||||||
func (b *body) Read(p []byte) (n int, err os.Error) {
|
func (b *body) Read(p []byte) (n int, err os.Error) {
|
||||||
if b.closed {
|
if b.closed {
|
||||||
return 0, ErrBodyReadAferClose
|
return 0, ErrBodyReadAfterClose
|
||||||
}
|
}
|
||||||
return b.Reader.Read(p)
|
return b.Reader.Read(p)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user