Closed mattrichards closed 9 years ago
I can't merge the PR because solution will not work well. We need to treat EOF specifically according to the way it is defined in the io library, ensuring that the number of requested bytes was read (completely).
I have included the fix in an upcoming update.
Also, the tests need an overhaul. They work today, but the organization needs some thought. I don't want to accept PR's for them now.
main issue with EOF logged as issue #58, and closed with commit 11c92bbf14fb06664d2a8ad2156de0ee58c51758
The io.Reader interface specifies that Read() may return io.EOF when it encounters the end of the stream, even if it returns some bytes. Handle this case in the decoder by setting the error to nil if it reads any bytes.