Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

readAsBytes() in io_io.dart returns too much data over http #23

Closed
lyceel opened this issue Jun 6, 2017 · 0 comments
Closed

readAsBytes() in io_io.dart returns too much data over http #23

lyceel opened this issue Jun 6, 2017 · 0 comments

Comments

@lyceel
Copy link
Contributor

lyceel commented Jun 6, 2017

When fetching a resource over http, twice the number of expected bytes are returned, with the first half being all zeroes.

I believe the solution would be to make https://github.com/dart-lang/resource/blob/master/lib/src/io_io.dart#L46
look like https://github.com/dart-lang/resource/blob/master/lib/src/io_io.dart#L80

lyceel added a commit to lyceel/resource that referenced this issue Jun 6, 2017
The `readAsBytes` method returns twice as much data as expected,
with the first half all zeroes. This comes from pre-allocating
the buffer, then appending to it (similar to issue 21, but with
`readAsBytes` instead of `readAsString`).

Updated the tests to also catch this case.

BUG: dart-archive#23
lrhn pushed a commit that referenced this issue Jun 6, 2017
The `readAsBytes` method returns twice as much data as expected,
with the first half all zeroes. This comes from pre-allocating
the buffer, then appending to it (similar to issue 21, but with
`readAsBytes` instead of `readAsString`).

Updated the tests to also catch this case.

BUG: #23
@lrhn lrhn closed this as completed Jun 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants