Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

h2o2

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h2o2 - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

1

lib/index.js

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

delete options.headers.host;
delete options.headers['content-length'];

@@ -105,0 +106,0 @@ if (settings.acceptEncoding === false) { // Defaults to true

2

package.json
{
"name": "h2o2",
"description": "Proxy handler plugin for hapi.js",
"version": "8.1.0",
"version": "8.1.1",
"repository": "git://github.com/hapijs/h2o2",

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

@@ -221,3 +221,5 @@ 'use strict';

.header('Custom1', 'custom header value 1')
.header('X-Custom2', 'custom header value 2');
.header('X-Custom2', 'custom header value 2')
.header('x-hostFound', request.headers.host)
.header('x-content-length-found', request.headers['content-length']);
};

@@ -232,3 +234,8 @@

const res = await server.inject('/headers');
const res = await server.inject({
url: '/headers',
headers: {
host: 'www.h2o2.com', 'content-length': 10000
}
});
expect(res.statusCode).to.equal(200);

@@ -238,2 +245,4 @@ expect(res.payload).to.equal('{\"status\":\"success\"}');

expect(res.headers['x-custom2']).to.equal('custom header value 2');
expect(res.headers['x-hostFound']).to.equal(undefined);
expect(res.headers['x-content-length-found']).to.equal(undefined);

@@ -305,3 +314,3 @@ await upstream.stop();

const server = await provisionServer();
const server = await provisionServer();
server.route({ method: 'GET', path: '/gzip', handler: { proxy: { host: 'localhost', port: upstream.info.port, passThrough: true } } });

@@ -571,3 +580,3 @@

const upstream = Hapi.server();
const upstream = Hapi.server();
await upstream.start();

@@ -574,0 +583,0 @@

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