-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: JSON & ExtJSON
-
None
Issue is here: https://github.com/mongodb/mongo-go-driver/blob/6310dd3c4b6b7db65c30139cb2396288e7d6a7e1/bson/bsonrw/json_scanner.go#L100-L104
Just because the underying reader returned io.EOF doesn't mean it totally failed. In this case, the gzip.Reader will return EOF and also less than the requested number of bytes, which are still valid bytes.