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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 0.2.0
    • None
    • JSON & ExtJSON
    • None

    Description

      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.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: