Comparing version 2.0.2 to 2.0.3
@@ -819,6 +819,8 @@ const fs = require('fs'); | ||
var fr = async function(rr, next) { | ||
rr.res.headers[':status'] = rr.res.statusCode; | ||
if (rr.res.headers['content-type'] === undefined) { | ||
rr.res.headers['content-type'] = 'text/html;charset=utf8'; | ||
} | ||
rr.stream.respond(rr.res.headers); | ||
await next(rr); | ||
@@ -830,4 +832,2 @@ | ||
rr.stream.end(JSON.stringify(rr.res.Body)); | ||
} else if (rr.res.Body instanceof Array) { | ||
rr.stream.end(JSON.stringify(rr.res.Body)); | ||
} else if (typeof rr.res.Body === 'string') { | ||
@@ -834,0 +834,0 @@ rr.stream.end(rr.res.Body); |
{ | ||
"name": "awy2", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "simple,small web framework", | ||
@@ -5,0 +5,0 @@ "main": "awy2.js", |
33477
818