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

@httptoolkit/httpolyglot

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@httptoolkit/httpolyglot - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

9

dist/index.js

@@ -8,3 +8,2 @@ "use strict";

const http2 = require("http2");
const SocketWrapper = require('_stream_wrap');
const events_1 = require("events");

@@ -113,3 +112,9 @@ function onError(err) { }

// We have a full match for the preface - it's definitely HTTP/2.
h2Server.emit('connection', new SocketWrapper(socket));
// For HTTP/2 we hit issues when passing non-socket streams (like HTTP/2 streams,
// for proxying H2-over-H2). Marking the sockets like this resolves that:
const socketWithInternals = socket;
if (socketWithInternals._handle) {
socketWithInternals._handle.isStreamBase = false;
}
h2Server.emit('connection', socket);
return;

@@ -116,0 +121,0 @@ }

{
"name": "@httptoolkit/httpolyglot",
"version": "1.0.1",
"version": "2.0.0",
"author": "Tim Perry <pimterry@gmail.com>",

@@ -20,3 +20,3 @@ "description": "Serve http and https connections over the same port with node.js",

"engines": {
"node": ">=8.0.0"
"node": ">=12.0.0"
},

@@ -23,0 +23,0 @@ "keywords": [

@@ -1,4 +0,5 @@

Description
===========
# Httpolyglot [![Build Status](https://github.com/httptoolkit/httpolyglot/workflows/CI/badge.svg)](https://github.com/httptoolkit/httpolyglot/actions) [![Available on NPM](https://img.shields.io/npm/v/@httptoolkit/httpolyglot.svg)](https://npmjs.com/package/@httptoolkit/httpolyglot)
> _Part of [HTTP Toolkit](https://httptoolkit.tech): powerful tools for building, testing & debugging HTTP(S)_
A module for serving http and https connections over the same port.

@@ -8,2 +9,3 @@

* Support for HTTP/2
* Fixing `tlsClientError`: https://github.com/mscdex/httpolyglot/pull/11.

@@ -17,3 +19,3 @@ * Exposing the lost bytes from https://github.com/mscdex/httpolyglot/issues/13 on the socket, as `__httpPeekedData`.

* [node.js](http://nodejs.org/) -- v8.0.0 or newer
* [node.js](http://nodejs.org/) -- v12.0.0 or newer

@@ -20,0 +22,0 @@

@@ -6,3 +6,2 @@ import * as net from 'net';

import * as http2 from 'http2';
const SocketWrapper = require('_stream_wrap');

@@ -140,3 +139,11 @@ import { EventEmitter } from 'events';

// We have a full match for the preface - it's definitely HTTP/2.
h2Server.emit('connection', new SocketWrapper(socket));
// For HTTP/2 we hit issues when passing non-socket streams (like HTTP/2 streams,
// for proxying H2-over-H2). Marking the sockets like this resolves that:
const socketWithInternals = socket as { _handle?: { isStreamBase?: boolean } };
if (socketWithInternals._handle) {
socketWithInternals._handle.isStreamBase = false;
}
h2Server.emit('connection', socket);
return;

@@ -143,0 +150,0 @@ } else {

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