net: parser should handle EOF without newline properly.
net: parser should handle EOF without newline properly.

Fixes issue 686.

R=rsc
CC=adg, golang-dev
http://codereview.appspot.com/979044

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

mhennings/marcohennings-go,bryanxu/go-zh,d0f/go-zh,rdp/rogerpack2005-golang,sanjosh/sanjos100-tipc,rflanagan/reginaldflanagan-project1,webfd/go-zh,npe9/noahevans-go9,webfd/go-zh,d0f/go-zh,npe9/noahevans-go9,webfd/go-zh,npe9/noahevans-go9,rflanagan/reginaldflanagan-project1,Triskite/willstone-goclone,rdp/rogerpack2005-golang,sanjosh/sanjos100-tipc,npe9/noahevans-go9,webfd/go-zh,webfd/go-zh,rdp/rogerpack2005-golang,d0f/go-zh,rdp/rogerpack2005-golang,rflanagan/reginaldflanagan-project1,npe9/noahevans-go9,bryanxu/go-zh,rflanagan/reginaldflanagan-project1,d0f/go-zh,scirelli/scirelli-go,scirelli/scirelli-go,npe9/noahevans-go9,npe9/noahevans-go9,Triskite/willstone-goclone,Triskite/willstone-goclone,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,sanjosh/sanjos100-tipc,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,sanjosh/sanjos100-tipc,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,bryanxu/go-zh,bryanxu/go-zh,rflanagan/reginaldflanagan-project1,d0f/go-zh,rdp/rogerpack2005-golang,bryanxu/go-zh,Triskite/willstone-goclone,webfd/go-zh,webfd/go-zh,npe9/noahevans-go9,glycerine/jeaten-go-arrayof-structof,mhennings/marcohennings-go,d0f/go-zh,scirelli/scirelli-go,scirelli/scirelli-go,glycerine/jeaten-go-arrayof-structof,d0f/go-zh,scirelli/scirelli-go,mhennings/marcohennings-go,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,rflanagan/reginaldflanagan-project1,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,scirelli/scirelli-go,sanjosh/sanjos100-tipc,bryanxu/go-zh,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,Triskite/willstone-goclone,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,bryanxu/go-zh,scirelli/scirelli-go,rdp/rogerpack2005-golang,scirelli/scirelli-go,bryanxu/go-zh,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-structof,webfd/go-zh,d0f/go-zh,rdp/rogerpack2005-golang,Triskite/willstone-goclone