deno icon indicating copy to clipboard operation
deno copied to clipboard

feat(ext/http): implement serveHttp on serve [WIP]

Open mmastrac opened this issue 1 year ago • 0 comments

DO NOT MERGE

Re-implements Deno.serveHttp on top of Deno.serve.

Breaking changes:

  • close on HttpConn is now async requiring the caller to await. We need this because we cannot guarantee the underlying Deno.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 in Deno.serve and may be replaced at a later time.
  • Removing the undocumented, unstable http namespace on Deno.

TODO:

  • [ ] Add test to Deno.serve for http+unix + host
  • [x] Add test to Deno.serve for AbortController::abort after shutdown

mmastrac avatar Jan 11 '24 22:01 mmastrac