deno
deno copied to clipboard
feat(ext/http): implement serveHttp on serve [WIP]
DO NOT MERGE
Re-implements Deno.serveHttp
on top of Deno.serve
.
Breaking changes:
-
close
onHttpConn
is nowasync
requiring the caller toawait
. We need this because we cannot guarantee the underlyingDeno.serve
server has shut down fully. This was also implicitly async in the previous design. -
respondWith
no longer returns a promise that resolves when the connection has been closed or the connection returns an error. This functionality is missing inDeno.serve
and may be replaced at a later time. - Removing the undocumented, unstable
http
namespace onDeno
.
TODO:
- [ ] Add test to Deno.serve for http+unix + host
- [x] Add test to Deno.serve for AbortController::abort after shutdown