mirror of
https://github.com/golang/go
synced 2024-11-19 01:54:39 -07:00
http: return the correct error if a header line is too long.
R=golang-dev, r2 CC=golang-dev https://golang.org/cl/2372042
This commit is contained in:
parent
4e3c58cd62
commit
8d130f5d2d
@ -249,6 +249,8 @@ func readLineBytes(b *bufio.Reader) (p []byte, err os.Error) {
|
||||
// If the caller asked for a line, there should be a line.
|
||||
if err == os.EOF {
|
||||
err = io.ErrUnexpectedEOF
|
||||
} else if err == bufio.ErrBufferFull {
|
||||
err = ErrLineTooLong
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user