Fix bug in subscription handling in mime package

The parser now parses each received chunk to the end no matter what the
paused state of the part stream is. This will add data to the part
stream controller before it is even listened on, but only the data already
received from the original input stream.

Not trying to stop the parsing on a received chunk when the part stream
is paused makes the code simpler to reason about.

The two added tests modes failed without this change. Either by hanging
or by hitting an exception trying to invoke the getter 'length' on null.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org//934763004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/mime@43835 260f80e4-7a28-3924-810f-c04153c831b5
3 files changed
tree: 41ef7d550c3c7413a201363338753cb405ec9c89
  1. lib/
  2. test/
  3. CHANGELOG.md
  4. LICENSE
  5. pubspec.yaml