diff --git a/.idea/runConfigurations/injects_header_or_throws_in_parameter_meta_test_dart.xml b/.idea/runConfigurations/injects_header_or_throws_in_parameter_meta_test_dart.xml
new file mode 100644
index 00000000..92114127
--- /dev/null
+++ b/.idea/runConfigurations/injects_header_or_throws_in_parameter_meta_test_dart.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index ef48d400..513c70c2 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,17 +2,9 @@
-
+
-
-
-
-
-
-
-
-
@@ -100,8 +92,8 @@
-
-
+
+
@@ -109,24 +101,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -156,8 +135,6 @@
- ContentType
- app
handleRe
instead.
io\b
@@ -186,6 +163,8 @@
match
getV
zone
+ zone.run
+ aaa
_isClosed
@@ -221,8 +200,8 @@
C:\Users\thosa\Source\Angel\framework\lib\src\http
C:\Users\thosa\Source\Angel\framework\test
$PROJECT_DIR$/lib/src
- $PROJECT_DIR$/lib
$PROJECT_DIR$/test
+ $PROJECT_DIR$/lib
@@ -283,8 +262,6 @@
-
-
@@ -292,6 +269,8 @@
+
+
@@ -336,6 +315,11 @@
+
+
+
+
+
@@ -380,7 +364,7 @@
-
+
@@ -507,11 +491,6 @@
-
-
-
-
-
@@ -576,41 +555,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -687,14 +666,7 @@
-
-
-
- 1506055702294
-
-
-
- 1506055702294
+
1506089003709
@@ -1032,43 +1004,50 @@
1523044574359
-
+
+ 1526436313662
+
+
+
+ 1526436313662
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -1087,7 +1066,7 @@
-
+
@@ -1102,10 +1081,11 @@
-
+
+
@@ -1116,7 +1096,6 @@
-
@@ -1127,7 +1106,6 @@
-
@@ -1152,7 +1130,8 @@
-
+
+
@@ -1161,13 +1140,6 @@
-
-
-
-
-
-
-
@@ -1363,6 +1335,7 @@
+
@@ -1412,14 +1385,6 @@
-
-
-
-
-
-
-
-
@@ -1436,16 +1401,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1454,16 +1409,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1477,7 +1422,7 @@
-
+
@@ -1487,7 +1432,7 @@
-
+
@@ -1536,14 +1481,50 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/src/http/angel_http.dart b/lib/src/http/angel_http.dart
index 009740c5..31b8a6e8 100644
--- a/lib/src/http/angel_http.dart
+++ b/lib/src/http/angel_http.dart
@@ -150,6 +150,7 @@ class AngelHttp {
);
var zone = Zone.current.fork(specification: zoneSpec);
+
return await zone.run(() async {
var path = req.path;
if (path == '/') path = '';
@@ -276,7 +277,8 @@ class AngelHttp {
..add(outputBuffer);
return finalizers.then((_) async {
- request.response.close();
+ await request.response.flush();
+ await request.response.close();
if (req.injections.containsKey(PoolResource)) {
req.injections[PoolResource].release();