Browse Source

check for HEAD method before unzipping response

Closes #145
http2
Vsevolod Strukchinsky 9 years ago
parent
commit
da9fc07a59
  1. 2
      index.js

2
index.js

@ -51,7 +51,7 @@ function requestAsEventEmitter(opts) {
// do not write ee.bind(...) instead of function - it will break gzip in Node.js 0.10
setImmediate(function () {
ee.emit('response', typeof unzipResponse === 'function' ? unzipResponse(res) : res);
ee.emit('response', typeof unzipResponse === 'function' && req.method !== 'HEAD' ? unzipResponse(res) : res);
});
});

Loading…
Cancel
Save