Flush alias
Hi,
This adds res.flushCompression() as an alias for res.flush()
This supports use such as:
// Not going to write again for a while. If compression middleware is
// installed let's tell it to flush what we've got through to the client.
if (res.flushCompression) {
res.flushCompression();
}
Currently the res object has a flush method regardless of whether compression middleware is installed. The built-in flush method issues a noisy deprecation warning. This patch provides an alias for the flush method to allow detection of the compression middleware's flush.
This addresses https://github.com/expressjs/compression/issues/72.
Thanks,
Bo
This would help me as well - any feedback on this @dougwilson?
This would be nice. Any chance of a quick review, @dougwilson?
In parallel, we can probably think of a good way to indicate if the response is getting compressed in a unique way that is obvious and doesn't conflict too much (darn Node.js taking res.flush() ;) ).