From 8d130f5d2d3bca8487c48e0cfb6a00a478057eba Mon Sep 17 00:00:00 2001 From: Stephen Ma Date: Wed, 6 Oct 2010 22:04:18 +1100 Subject: [PATCH] http: return the correct error if a header line is too long. R=golang-dev, r2 CC=golang-dev https://golang.org/cl/2372042 --- src/pkg/http/request.go | 2 ++ 1 file changed, 2 insertions(+) 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 } -- 2.50.0