Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa

Package Overview
Dependencies
Maintainers
6
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

9

History.md
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 @@ };

7

lib/context.js

@@ -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": "*",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc