Bug: Express errors when sending big file #23912
Labels
bug
Something isn't working correctly
node compat
node:http
Issues with `node:http` module - to be fixed with a rewrite
Steps to reproduce
cd
into itnpm init -y && npm i express && deno init
server.mjs
with these contents:home.html
with the contents from here (too big to put as inline snippet) https://gist.github.com/marvinhagemeister/2b1cde3a3527637d12332550ab65eae4 . Alternative any other big (>3MB) html file should workdeno run -A server.mjs
wrk -d 10 --latency http://localhost:3000/
Error
error: Uncaught (in promise) TypeError: The stream controller cannot close or enqueue. at ReadableStreamDefaultController.enqueue (ext:deno_web/06_streams.js:6057:13) at Function.#enqueue (node:http:917:18) at ServerResponse.write [as _write] (node:http:949:32) at writeOrBuffer (ext:deno_node/_stream.mjs:3947:16) at _write (ext:deno_node/_stream.mjs:3892:14) at ServerResponse.Writable.write (ext:deno_node/_stream.mjs:3895:14) at ReadStream.ondata (ext:deno_node/_stream.mjs:3179:26) at ReadStream.emit (ext:deno_node/_stream.mjs:1851:9) at addChunk (ext:deno_node/_stream.mjs:2873:16) at readableAddChunk (ext:deno_node/_stream.mjs:2852:13)
Version: Deno 1.43.5
The text was updated successfully, but these errors were encountered: