Browse Source

Forward errors in proxy mode.

http2
Julien Fontanet 10 years ago
parent
commit
9969aa9582
  1. 5
      index.js

5
index.js

@ -74,6 +74,11 @@ module.exports = function (url, opts, cb) {
// pipe the response to the proxy if in proxy mode // pipe the response to the proxy if in proxy mode
if (proxy) { if (proxy) {
res.pipe(proxy); res.pipe(proxy);
res.on('error', function forwardError(error) {
proxy.emit('error', error);
})
return; return;
} }

Loading…
Cancel
Save