1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00
denoland-deno/ext/flash
Kamil Ogórek 1d7203c24c
fix(ext/flash): Correctly handle errors for chunked responses (#17303)
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.
2023-01-14 15:06:28 +01:00
..
01_http.js fix(ext/flash): Correctly handle errors for chunked responses (#17303) 2023-01-14 15:06:28 +01:00
Cargo.toml chore: forward 1.29.3 release back to main (#17401) 2023-01-13 13:36:51 -05:00
chunked.rs chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00
lib.rs feat(core): allow specifying name and dependencies of an Extension (#17301) 2023-01-08 23:48:46 +01:00
README.md feat(unstable): change Deno.serve() API (#15498) 2022-08-19 14:36:01 +02:00
request.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
sendfile.rs chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00
socket.rs chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00

flash

Flash is a fast HTTP/1.1 server implementation for Deno.

serve({ fetch: (req) => new Response("Hello World") });