mreiferson / go-snappystream

a Go package for framed snappy streams
MIT License
45 stars 13 forks source link

reader doesn't require that streams begin with the stream identifier #8

Closed bmatsuo closed 10 years ago

bmatsuo commented 10 years ago

From the spec (4.1 Stream identifier)

a valid Snappy framed stream always starts with the bytes 0xff 0x06 0x00 0x00 0x73 0x4e 0x61 0x50 0x70 0x59

The reader correctly ignores spurious stream identifiers located in the middle of streams, but does not properly enforce that the stream starts with a stream identifier block.

mreiferson commented 10 years ago

oops :frowning:

bmatsuo commented 10 years ago

It's technically not a backwards compatible change to fix. How do you want to do it?

IMO people relying on broken behavior deserve to break. Amirite?

mreiferson commented 10 years ago

Yea, I think we should just fix it, it's broken.