Browse Source

tweaks

http2
Sindre Sorhus 11 years ago
parent
commit
a2501bf122
  1. 7
      index.js

7
index.js

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

Loading…
Cancel
Save