http2-proxy
Advanced tools
Comparing version 5.0.25 to 5.0.26
27
index.js
@@ -172,2 +172,3 @@ const net = require('net') | ||
req[kRes] = res | ||
req[kProxyReq] = proxyReq | ||
@@ -177,3 +178,2 @@ res[kReq] = req | ||
res[kProxySocket] = null | ||
res[kProxyReq] = proxyReq | ||
res[kProxyRes] = null | ||
@@ -226,9 +226,11 @@ res[kProxyCallback] = callback | ||
const proxyReq = req[kProxyReq] | ||
const proxySocket = res[kProxySocket] | ||
const proxyReq = res[kProxyReq] | ||
const proxyRes = res[kProxyRes] | ||
const callback = res[kProxyCallback] | ||
req[kProxyReq] = null | ||
res[kProxySocket] = null | ||
res[kProxyReq] = null | ||
res[kProxyRes] = null | ||
@@ -280,9 +282,3 @@ res[kProxyCallback] = null | ||
function onRequestData (buf) { | ||
const res = this[kRes] | ||
if (res[kProxyRes]) { | ||
return | ||
} | ||
if (!res[kProxyReq].write(buf)) { | ||
if (!this[kProxyReq].write(buf)) { | ||
this.pause() | ||
@@ -293,9 +289,3 @@ } | ||
function onRequestEnd () { | ||
const res = this[kRes] | ||
if (res[kProxyRes]) { | ||
return | ||
} | ||
res[kProxyReq].end() | ||
this[kProxyReq].end() | ||
} | ||
@@ -382,4 +372,3 @@ | ||
if (this.trailers) { | ||
const res = this[kRes] | ||
res.addTrailers(this.trailers) | ||
this[kRes].addTrailers(this.trailers) | ||
} | ||
@@ -386,0 +375,0 @@ } |
{ | ||
"name": "http2-proxy", | ||
"version": "5.0.25", | ||
"version": "5.0.26", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 src" |
23446
419