From 1bb077a3d9b9c400d04add48f19e0d6b58e19987 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Fri, 7 Oct 2016 17:39:41 -0400 Subject: [PATCH] CORS-able --- lib/src/http/server.dart | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index a5757675..197e982c 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -227,10 +227,10 @@ class Angel extends AngelBase { _finalizeResponse(HttpRequest request, ResponseContext res) async { try { + _afterProcessed.add(request); if (!res.willCloseItself) { res.responseData.forEach((blob) => request.response.add(blob)); await request.response.close(); - _afterProcessed.add(request); } } catch (e) { failSilently(request, res); diff --git a/pubspec.yaml b/pubspec.yaml index 4e70a091..abb87f81 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.0-dev.21 +version: 1.0.0-dev.22 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework