@httptoolkit/httpolyglot
Advanced tools
Comparing version 2.1.0 to 2.1.1
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import * as net from 'net'; | ||
@@ -3,0 +7,0 @@ import * as tls from 'tls'; |
@@ -108,3 +108,6 @@ "use strict"; | ||
tlsListener(tlsSocket) { | ||
if (tlsSocket.alpnProtocol === false || tlsSocket.alpnProtocol === 'http/1.1') { | ||
if (tlsSocket.alpnProtocol === false || // Old non-ALPN client | ||
tlsSocket.alpnProtocol === 'http/1.1' || // Modern HTTP/1.1 ALPN client | ||
tlsSocket.alpnProtocol === 'http 1.1' // Broken ALPN client (e.g. https-proxy-agent) | ||
) { | ||
this._httpServer.emit('connection', tlsSocket); | ||
@@ -111,0 +114,0 @@ } |
{ | ||
"name": "@httptoolkit/httpolyglot", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"author": "Tim Perry <pimterry@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Serve http and https connections over the same port with node.js", |
@@ -154,3 +154,7 @@ import * as net from 'net'; | ||
private tlsListener(tlsSocket: tls.TLSSocket) { | ||
if (tlsSocket.alpnProtocol === false || tlsSocket.alpnProtocol === 'http/1.1') { | ||
if ( | ||
tlsSocket.alpnProtocol === false || // Old non-ALPN client | ||
tlsSocket.alpnProtocol === 'http/1.1' || // Modern HTTP/1.1 ALPN client | ||
tlsSocket.alpnProtocol === 'http 1.1' // Broken ALPN client (e.g. https-proxy-agent) | ||
) { | ||
this._httpServer.emit('connection', tlsSocket); | ||
@@ -157,0 +161,0 @@ } else { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29456
429