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

http2-wrapper

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http2-wrapper - npm Package Compare versions

Comparing version 2.0.8 to 2.0.9

2

package.json
{
"name": "http2-wrapper",
"version": "2.0.8",
"version": "2.0.9",
"description": "HTTP2 client, just with the familiar `https` API",

@@ -5,0 +5,0 @@ "main": "source",

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

HTTP2_HEADER_PATH,
HTTP2_HEADER_AUTHORITY,
HTTP2_METHOD_CONNECT

@@ -106,4 +107,7 @@ } = http2.constants;

this.method = options.method || 'GET';
this.path = options.path;
if (!(this.method === 'CONNECT' && (options.path === '/' || options.path === undefined))) {
this.path = options.path;
}
this.res = null;

@@ -170,3 +174,5 @@ this.aborted = false;

get path() {
return this[kHeaders][HTTP2_HEADER_PATH];
const header = this.method === 'CONNECT' ? HTTP2_HEADER_AUTHORITY : HTTP2_HEADER_PATH;
return this[kHeaders][header];
}

@@ -176,3 +182,5 @@

if (value) {
this[kHeaders][HTTP2_HEADER_PATH] = value;
const header = this.method === 'CONNECT' ? HTTP2_HEADER_AUTHORITY : HTTP2_HEADER_PATH;
this[kHeaders][header] = value;
}

@@ -215,4 +223,4 @@ }

const callEnd = () => {
// For GET, HEAD and DELETE
if (this._mustNotHaveABody) {
// For GET, HEAD and DELETE and CONNECT
if (this._mustNotHaveABody || this.method === 'CONNECT') {
callback();

@@ -419,4 +427,4 @@ return;

if (!(':authority' in this[kHeaders]) && !isConnectMethod) {
this[kHeaders][':authority'] = this[kOrigin].host;
if (!(HTTP2_HEADER_AUTHORITY in this[kHeaders]) && !isConnectMethod) {
this[kHeaders][HTTP2_HEADER_AUTHORITY] = this[kOrigin].host;
}

@@ -511,3 +519,7 @@

this[kHeaders][lowercased] = value;
if (lowercased === 'host' && this.method === 'CONNECT') {
this[kHeaders][HTTP2_HEADER_AUTHORITY] = value;
} else {
this[kHeaders][lowercased] = value;
}
}

@@ -514,0 +526,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