Merge branch 'master' of github.com:koajs/koa
This commit is contained in:
commit
b3761b5da0
2 changed files with 4 additions and 5 deletions
|
@ -115,7 +115,7 @@ app.context = function(obj){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a request handler callback
|
* Return a request handler callback
|
||||||
* for node's native htto server.
|
* for node's native http server.
|
||||||
*
|
*
|
||||||
* @return {Function}
|
* @return {Function}
|
||||||
* @api public
|
* @api public
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module dependencies.
|
* Module dependencies.
|
||||||
*/
|
*/
|
||||||
|
@ -592,12 +591,12 @@ module.exports = {
|
||||||
// handler and log.
|
// handler and log.
|
||||||
if (this.headerSent) {
|
if (this.headerSent) {
|
||||||
err.headerSent = true;
|
err.headerSent = true;
|
||||||
this.app.emit('error', err);
|
this.app.emit('error', err, this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delegate
|
// delegate
|
||||||
this.app.emit('error', err);
|
this.app.emit('error', err, this);
|
||||||
|
|
||||||
// err.status support
|
// err.status support
|
||||||
if (err.status) {
|
if (err.status) {
|
||||||
|
@ -915,4 +914,4 @@ function escape(html) {
|
||||||
.replace(/"/g, '"')
|
.replace(/"/g, '"')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>');
|
.replace(/>/g, '>');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue