Comparing version 0.6.2 to 0.6.3
0.6.3 / 2014-06-06 | ||
================== | ||
* fix res.type= when the extension is unknown | ||
* assert when non-error is passed to app.onerror #287 | ||
* bump finished | ||
0.6.2 / 2014-06-03 | ||
@@ -6,3 +13,3 @@ ================== | ||
* switch from set-type to mime-types | ||
0.6.1 / 2014-05-11 | ||
@@ -9,0 +16,0 @@ ================== |
@@ -158,6 +158,10 @@ /** | ||
app.onerror = function(err){ | ||
assert(err instanceof Error, 'non-error thrown: ' + err); | ||
if (404 == err.status) return; | ||
if ('test' == this.env) return; | ||
var msg = err.stack || err.toString(); | ||
console.error(); | ||
console.error(err.stack.replace(/^/gm, ' ')); | ||
console.error(msg.replace(/^/gm, ' ')); | ||
console.error(); | ||
@@ -164,0 +168,0 @@ }; |
@@ -94,2 +94,5 @@ | ||
// delegate | ||
this.app.emit('error', err, this); | ||
// nothing we can do here other | ||
@@ -100,9 +103,5 @@ // than delegate to the app-level | ||
err.headerSent = true; | ||
this.app.emit('error', err, this); | ||
return; | ||
} | ||
// delegate | ||
this.app.emit('error', err, this); | ||
// unset all headers | ||
@@ -109,0 +108,0 @@ this.res._headers = {}; |
@@ -277,3 +277,3 @@ | ||
set type(type) { | ||
this.set('Content-Type', getType(type)); | ||
this.set('Content-Type', getType(type) || 'application/octet-stream'); | ||
}, | ||
@@ -280,0 +280,0 @@ |
{ | ||
"name": "koa", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "Koa web app framework", | ||
@@ -29,3 +29,3 @@ "main": "lib/application.js", | ||
"mime-types": "~1.0.0", | ||
"finished": "~1.1.1", | ||
"finished": "~1.2.0", | ||
"co": "~3.0.2", | ||
@@ -32,0 +32,0 @@ "debug": "*", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37294
1227
+ Addedee-first@1.0.3(transitive)
+ Addedfinished@1.2.2(transitive)
- Removedfinished@1.1.4(transitive)
Updatedfinished@~1.2.0