Commit 8d130f5d authored by Stephen Ma's avatar Stephen Ma

http: return the correct error if a header line is too long.

R=golang-dev, r2
CC=golang-dev
https://golang.org/cl/2372042
parent 4e3c58cd
...@@ -249,6 +249,8 @@ func readLineBytes(b *bufio.Reader) (p []byte, err os.Error) { ...@@ -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 the caller asked for a line, there should be a line.
if err == os.EOF { if err == os.EOF {
err = io.ErrUnexpectedEOF err = io.ErrUnexpectedEOF
} else if err == bufio.ErrBufferFull {
err = ErrLineTooLong
} }
return nil, err return nil, err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment