Socket
Socket
Sign inDemoInstall

@hapi/hapi

Package Overview
Dependencies
29
Maintainers
7
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 21.3.4 to 21.3.5

19

lib/core.js

@@ -560,2 +560,21 @@ 'use strict';

if (request) {
// If a request is available, it means that the connection and parsing has progressed far enough to have created the request.
if (err.code === 'HPE_INVALID_METHOD') {
// This parser error is for a pipelined request. Schedule destroy once current request is done.
request.raw.res.once('close', () => {
if (socket.readable) {
socket.end(internals.badRequestResponse);
}
else {
socket.destroy(err);
}
});
return;
}
const error = Boom.badRequest();

@@ -562,0 +581,0 @@ error.output.headers = { connection: 'close' };

12

lib/request.js

@@ -496,3 +496,3 @@ 'use strict';

if (!Boom.isBoom(this.response)) {
if (this.response._close) {
if (this.response.statusCode === 500 &&

@@ -505,5 +505,3 @@ this.response._error) {

if (this.response._close) {
this.response._close();
}
this.response._close();
}

@@ -527,9 +525,7 @@

this.response._close();
this.response._close?.();
}
if (this.info.completed) {
if (response._close) {
response._close();
}
response._close?.();

@@ -536,0 +532,0 @@ return;

@@ -5,3 +5,3 @@ {

"homepage": "https://hapi.dev",
"version": "21.3.4",
"version": "21.3.5",
"repository": "git://github.com/hapijs/hapi",

@@ -8,0 +8,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc