mime
mime copied to clipboard
no events from MimeMultipart.listen() when called asynchronously
Originally opened as dart-lang/sdk#20140
This issue was originally filed by [email protected]
What steps will reproduce the problem?
- Create an HTTP server
- Transform requests with MimeMultipartTransformer
- listen() on the resulting MimeMultipart object after a short Timer callback
What is the expected output? What do you see instead?
I expect to get data events the way I should from listen(). Instead, I usually get zero callbacks. If I was uploading a large file, I sometimes get one empty array. It is not very impressive.
What version of the product are you using?
The mime library version 0.9.0+3, Dart version 1.5.3.
On what operating system?
Mac OS X
What browser (if applicable)?
N/A
Please provide any additional information below.
I have recreated this bug in an isolated project here: https://github.com/unixpickle/dart-multipart-bug. Additionally, that repository includes a patch which fixes the issue. Somebody else should look over my patch before verifying it, but it's pretty small.