Skip to content

Commit 86aa384

Browse files
committed
Changeset
1 parent 2549b08 commit 86aa384

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.changeset/whole-planes-mate.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
'@whatwg-node/server': patch
33
---
44

5-
Call response.end without waiting for `.write` because some implementations do not have callback in
6-
`response.write`
7-
85
Some implementations like `compression` npm package do not implement `response.write(data, callback)` signature, but whatwg-node/server waits for it to finish the response stream.
6+
Then it causes the response stream hangs when the compression package takes the stream over when the response data is larger than its threshold.
7+
98
It is actually a bug in `compression` package;
109
https://github.com/expressjs/compression/blob/master/index.js#L99
11-
But since it is a common mistake, we prefer to workaround this on our end.
10+
But since it is a common mistake, we prefer to workaround this on our end.
11+
12+
So now the server adapter calls `response.end` immediately after `response.write` for static responses.

0 commit comments

Comments
 (0)