mirror of
https://github.com/denoland/deno.git
synced 2024-12-29 02:29:06 -05:00
4cc9e2e325
The leading cause of the problem was that `handleResponse` has `tryRespondChunked` passed as an argument, which in turn is implemented as a call to `core.ops.op_try_flash_respond_chuncked`, that throws in the repro code. `handleResponse` was not handled correctly, as it not returned any value, and had no `catch` attached to it. It also effectively was never correctly handled inside two other blocks with `resp.then` and `PromisePrototypeCatch(PromisePrototypeThen(resp, "..."))` as well, as it just short-circuited the promise with an empty resolve, instead of relying on the last `(async () => {})` block. This change makes `handleResponse` return a correct value and attach `onError` handler to the "non-thenable" variant of response handling code. |
||
---|---|---|
.. | ||
01_http.js | ||
Cargo.toml | ||
chunked.rs | ||
lib.rs | ||
README.md | ||
request.rs | ||
sendfile.rs | ||
socket.rs |
flash
Flash is a fast HTTP/1.1 server implementation for Deno.
serve({ fetch: (req) => new Response("Hello World") });