Comparing version 8.5.1 to 8.6.0
@@ -0,1 +1,18 @@ | ||
<a name="8.6.0"></a> | ||
## 8.6.0 (2021-09-28) | ||
#### Bug Fixes | ||
* use more reliable close event ([e183e5d8](git://github.com/restify/node-restify.git/commit/e183e5d8)) | ||
* examples/todoapp/package.json to reduce vulnerabilities (#1832) ([d9b27c60](git://github.com/restify/node-restify.git/commit/d9b27c60)) | ||
* **npm:** exclude extraneous files (#1818) ([e8516c37](git://github.com/restify/node-restify.git/commit/e8516c37)) | ||
#### Features | ||
* send 500s for unhandled requests (#1777) ([885cecd7](git://github.com/restify/node-restify.git/commit/885cecd7)) | ||
* **deps:** replace cover/istanbul with nyc (#1823) ([361f83e5](git://github.com/restify/node-restify.git/commit/361f83e5)) | ||
<a name="8.5.1"></a> | ||
@@ -2,0 +19,0 @@ ### 8.5.1 (2019-12-13) |
@@ -189,3 +189,3 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
// way through a POST request | ||
req.once('close', next); | ||
req.socket.once('close', next); | ||
req.once('aborted', next); | ||
@@ -192,0 +192,0 @@ req.resume(); |
@@ -1363,3 +1363,6 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved. | ||
if (res._finished) { | ||
// if the returned err value was a string, then we're handling the | ||
// next('foo') case where we redirect to another middleware stack. don't | ||
// do anything here because we're not done yet. | ||
if (res._finished || _.isString(err)) { | ||
return; | ||
@@ -1378,2 +1381,18 @@ } | ||
self.emit('after', req, res, route, finalErr); | ||
} else if ( | ||
res._handlersFinished === true && | ||
res.headersSent === false && | ||
!res.err | ||
) { | ||
// if we reached the end of the handler chain and headers haven't been | ||
// sent AND there isn't an existing res.err (e.g., req abort/close), | ||
// it's possible it's a user error and a response was never written. | ||
// send a 500. | ||
res.send( | ||
new errors.InternalServerError( | ||
'reached the end of the handler chain without ' + | ||
'writing a response!' | ||
) | ||
); | ||
return; | ||
} else { | ||
@@ -1380,0 +1399,0 @@ // Store error for when the response is flushed and we actually emit the |
@@ -77,3 +77,3 @@ { | ||
], | ||
"version": "8.5.1", | ||
"version": "8.6.0", | ||
"repository": { | ||
@@ -126,3 +126,2 @@ "type": "git", | ||
"chai": "^4.2.0", | ||
"cover": "^0.2.9", | ||
"coveralls": "^3.0.3", | ||
@@ -136,6 +135,6 @@ "documentation": "^11.0.0", | ||
"inquirer": "^3.3.0", | ||
"istanbul": "^0.4.5", | ||
"mkdirp": "^0.5.1", | ||
"mocha": "^6.0.2", | ||
"mocha": "^7.1.1", | ||
"nodeunit": "^0.11.3", | ||
"nyc": "^15.0.0", | ||
"ora": "^1.3.0", | ||
@@ -142,0 +141,0 @@ "pre-commit": "^1.2.2", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
24
333089
63
8242
7