| commit | 5644774ea5c954a08c1e068be9771429a232ca7c | [log] [tgz] |
|---|---|---|
| author | Josh Bleecher Snyder <josharian@gmail.com> | Mon Oct 28 19:31:25 2013 -0400 |
| committer | Russ Cox <rsc@golang.org> | Mon Oct 28 19:31:25 2013 -0400 |
| tree | e527348e6431ada215afadb8e7ee4f5ce96a5ada | |
| parent | 6ea5687b46b080304584fbc80c3e2dd18f2e1c43 [diff] [blame] |
net: handle single-line non-\n-terminated files correctly in readLine Fixes #6646. R=rsc, bradfitz CC=golang-dev https://golang.org/cl/15960047
diff --git a/src/pkg/net/parse.go b/src/pkg/net/parse.go index 7c87b42..6056de2 100644 --- a/src/pkg/net/parse.go +++ b/src/pkg/net/parse.go
@@ -54,7 +54,7 @@ if n >= 0 { f.data = f.data[0 : ln+n] } - if err == io.EOF { + if err == io.EOF || err == io.ErrUnexpectedEOF { f.atEOF = true } }