kopia lustrzana https://github.com/c9/core
also call res.end
rodzic
6b1a1c9ee8
commit
5974323cfc
|
@ -11,8 +11,10 @@ module.exports = function setup(mount, vfs, mountOptions) {
|
|||
|
||||
var errorHandler = mountOptions.errorHandler || function (req, res, err, code) {
|
||||
console.error(err.stack || err);
|
||||
if (res.headersSent)
|
||||
if (res.headersSent) {
|
||||
res.end("");
|
||||
return;
|
||||
}
|
||||
|
||||
if (code) res.statusCode = code;
|
||||
else if (typeof err.code == "number") res.statusCode = err.code;
|
||||
|
|
Ładowanie…
Reference in New Issue