diff --git a/CHANGELOG.md b/CHANGELOG.md index a99ee583..786fc868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.0.3 +* Patch up a bug caused by an upstream change to Dart's stream semantics. +See more: https://github.com/angel-dart/angel/issues/106#issuecomment-499564485 + # 2.0.2+1 * Fix a bug in the implementation of `Controller.applyRoutes`. diff --git a/lib/src/core/response_context.dart b/lib/src/core/response_context.dart index f0428055..acdc18c0 100644 --- a/lib/src/core/response_context.dart +++ b/lib/src/core/response_context.dart @@ -320,7 +320,7 @@ abstract class ResponseContext : MediaType.parse(mimeType); if (correspondingRequest.method != 'HEAD') { - return file.openRead().pipe(this); + return this.addStream(file.openRead()).then((_) => this.close()); } } diff --git a/pubspec.yaml b/pubspec.yaml index d9ce087a..368462c9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 2.0.2+1 +version: 2.0.3 description: A high-powered HTTP server with dependency injection, routing and much more. author: Tobe O homepage: https://github.com/angel-dart/angel_framework