Socket
Socket
Sign inDemoInstall

http2-proxy

Package Overview
Dependencies
Maintainers
1
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http2-proxy - npm Package Compare versions

Comparing version 5.0.28 to 5.0.29

30

index.js

@@ -26,3 +26,2 @@ const net = require('net')

const kProxySocket = Symbol('proxySocket')
const kConnected = Symbol('connected')
const kOnRes = Symbol('onRes')

@@ -183,3 +182,2 @@

proxyReq[kRes] = res
proxyReq[kConnected] = false
proxyReq[kOnRes] = onRes

@@ -196,2 +194,4 @@

.on('error', onComplete)
.on('data', onRequestData)
.on('end', onRequestEnd)

@@ -203,18 +203,7 @@ proxyReq

.on('upgrade', onProxyReqUpgrade)
.on('drain', onProxyRequestDrain)
deferToConnect.call(proxyReq, onProxyConnect)
return promise
}
function deferToConnect (cb) {
this.once('socket', function (socket) {
if (!socket.connecting) {
cb.call(this)
} else {
socket.once('connect', cb.bind(this))
}
})
}
function onComplete (err) {

@@ -271,13 +260,2 @@ const res = this[kRes]

function onProxyConnect () {
this[kConnected] = true
this[kReq]
.on('data', onRequestData)
.on('end', onRequestEnd)
this
.on('drain', onProxyRequestDrain)
}
function onRequestData (buf) {

@@ -298,3 +276,3 @@ if (!this[kProxyReq].write(buf)) {

function onProxyReqError (err) {
err.statusCode = this[kConnected] ? 502 : 503
err.statusCode = this.headersSent ? 502 : 503
onComplete.call(this, err)

@@ -301,0 +279,0 @@ }

2

package.json
{
"name": "http2-proxy",
"version": "5.0.28",
"version": "5.0.29",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 src"

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