http2-proxy
Advanced tools
Comparing version 5.0.12 to 5.0.13
{ | ||
"name": "http2-proxy", | ||
"version": "5.0.12", | ||
"version": "5.0.13", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 src", |
@@ -168,3 +168,2 @@ # http2-proxy | ||
let bytesWritten = 0 | ||
try { | ||
@@ -187,2 +186,5 @@ return await proxy.web(req, res, { | ||
// NOTE: At some point this will be possible | ||
// proxyRes.pipe(res) | ||
function onClose () { | ||
@@ -199,3 +201,3 @@ res.off('drain', onDrain) | ||
// WORKAROUND: https://github.com/nodejs/node/pull/28004 | ||
bytesWritten += buf.length | ||
res.bytesWritten = (res.bytesWritten || 0) + buf.length | ||
if (!res.write(buf)) { | ||
@@ -231,3 +233,3 @@ proxyRes.pause() | ||
if (req.method === 'HEAD' || req.method === 'GET') { | ||
if (bytesWritten === 0) { | ||
if (!res.bytesWritten) { | ||
continue | ||
@@ -234,0 +236,0 @@ } else { |
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
22583
307