New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hapi

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi - npm Package Compare versions

Comparing version 16.1.0 to 16.1.1

9

lib/compression.js

@@ -50,3 +50,10 @@ 'use strict';

return Accept.encoding(request.headers['accept-encoding'], this.encodings);
const header = request.headers['accept-encoding'];
const accept = Accept.encoding(header, this.encodings);
if (accept instanceof Error) {
request.log(['accept-encoding', 'error'], { header, error: accept });
return 'identity';
}
return accept;
};

@@ -53,0 +60,0 @@

5

lib/protect.js

@@ -28,6 +28,3 @@ 'use strict';

this.domain = Domain.create();
this.domain.on('error', (err) => {
return this._onError(err);
});
this.domain.on('error', this._onError.bind(this));
};

@@ -34,0 +31,0 @@

@@ -110,14 +110,2 @@ 'use strict';

this.info = {
received: now,
responded: 0,
remoteAddress: req.connection.remoteAddress,
remotePort: req.connection.remotePort || '',
referrer: req.headers.referrer || req.headers.referer || '',
host: req.headers.host ? req.headers.host.replace(/\s/g, '') : '',
acceptEncoding: this.connection._compression.accept(this)
};
this.info.hostname = this.info.host.split(':')[0];
// Assigned elsewhere:

@@ -157,2 +145,16 @@

// Request info
this.info = {
received: now,
responded: 0,
remoteAddress: req.connection.remoteAddress,
remotePort: req.connection.remotePort || '',
referrer: req.headers.referrer || req.headers.referer || '',
host: req.headers.host ? req.headers.host.replace(/\s/g, '') : '',
acceptEncoding: this.connection._compression.accept(this)
};
this.info.hostname = this.info.host.split(':')[0];
// Listen to request state

@@ -159,0 +161,0 @@

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

"homepage": "http://hapijs.com",
"version": "16.1.0",
"version": "16.1.1",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -23,2 +23,6 @@ <img src="https://raw.github.com/hapijs/hapi/master/images/hapi.png" />

#### Current Supporters
- **CNN Digital**
#### Legacy Supporters

@@ -25,0 +29,0 @@

Sorry, the diff of this file is not supported yet

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