Skip to content

compress/zlib: Reader returns unexpected EOF when calling Read after EOF #14675

@AsamK

Description

@AsamK
  1. What version of Go are you using (go version)?
    go1.6
  2. What operating system and processor architecture are you using (go env)?
    linux/amd64
  3. What did you do?
    Test returning of EOF and unexpected EOF
    https://play.golang.org/p/RJfp3HgcQ5
  4. What did you expect to see?
    The last read should return EOF
  5. What did you see instead?
    The last read returns UnexpectedEOF
    The issue was triggered by b179739 , which introduced unexpected EOF for truncated streams.

I'm not certain, if the io.Read() interface guarantees that calls after the first one that returned EOF should also return EOF, but returning "unexpected EOF" is definitely unexpected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions