Socket
Socket
Sign inDemoInstall

@hapi/hapi

Package Overview
Dependencies
Maintainers
6
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/hapi - npm Package Compare versions

Comparing version 20.1.0 to 20.1.1

7

lib/request.js

@@ -27,2 +27,3 @@ 'use strict';

this._allowInternals = !!options.allowInternals;
this._closed = false; // true once the response has closed (esp. early) and will not emit any more events
this._core = server._core;

@@ -315,2 +316,3 @@ this._entity = null; // Entity information set via h.entity()

this.raw.req.on('aborted', internals.event.bind(this.raw.req, this._eventContext, 'abort'));
this.raw.res.once('close', internals.closed.bind(this.raw.res, this));
}

@@ -692,2 +694,7 @@

internals.closed = function (request) {
request._closed = true;
};
internals.event = function ({ request }, event, err) {

@@ -694,0 +701,0 @@

@@ -247,2 +247,9 @@ 'use strict';

if (request._closed) {
// No more events will be fired, so we proactively close-up shop
request.raw.res.end(); // Ensure res is finished so internals.end() doesn't think we're responding
internals.end(env, 'close');
return team.work;
}
const aborted = internals.end.bind(null, env, 'aborted');

@@ -249,0 +256,0 @@ const close = internals.end.bind(null, env, 'close');

2

package.json

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

"homepage": "https://hapi.dev",
"version": "20.1.0",
"version": "20.1.1",
"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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc