Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-700

JSON scanner fails when underlying reader reads less than the requested bytes and also returns io.EOF

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.2.0
    • 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.

       

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: