Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 46b3ff3

Browse files
committed
flush response if compression middleware is used
1 parent 8dc8565 commit 46b3ff3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,10 @@ function sendPartialResponse(
570570
'',
571571
].join('\r\n');
572572
response.write(data);
573+
if (typeof response.flush === 'function') {
574+
// flush response if compression middleware is used
575+
response.flush();
576+
}
573577
}
574578

575579
/**

0 commit comments

Comments
 (0)