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

Commit

Permalink
flush response if compression middleware is used
Browse files Browse the repository at this point in the history
  • Loading branch information
robrichard committed Sep 30, 2020
1 parent 8dc8565 commit 46b3ff3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

/**
Expand Down

0 comments on commit 46b3ff3

Please sign in to comment.