From: Stephen Ma Date: Wed, 6 Oct 2010 11:04:18 +0000 (+1100) Subject: http: return the correct error if a header line is too long. X-Git-Tag: weekly.2010-10-13~64 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8d130f5d2d3bca8487c48e0cfb6a00a478057eba;p=gostls13.git http: return the correct error if a header line is too long. R=golang-dev, r2 CC=golang-dev https://golang.org/cl/2372042 --- diff --git a/src/pkg/http/request.go b/src/pkg/http/request.go index d0de2732d2..45533fab52 100644 --- a/src/pkg/http/request.go +++ b/src/pkg/http/request.go @@ -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 }