diff --git a/src/index.js b/src/index.js index 9fe46370..bb5251e0 100644 --- a/src/index.js +++ b/src/index.js @@ -570,6 +570,10 @@ function sendPartialResponse( '', ].join('\r\n'); response.write(data); + if (typeof response.flush === 'function') { + // flush response if compression middleware is used + response.flush(); + } } /**