From eed2598e6cf1db643b4edd07b5eff94c59eb9408 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Wed, 24 Apr 2024 14:03:37 -0400 Subject: feat(ext/http): Implement request.signal for Deno.serve (#23425) When the response has been successfully send, we abort the `Request.signal` property to indicate that all resources associated with this transaction may be torn down. --- ext/node/polyfills/http.ts | 2 +- ext/node/polyfills/http2.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/node') diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index ceaf7aeb8..07ef66146 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -59,7 +59,7 @@ import { ERR_UNESCAPED_CHARACTERS, } from "ext:deno_node/internal/errors.ts"; import { getTimerDuration } from "ext:deno_node/internal/timers.mjs"; -import { serve, upgradeHttpRaw } from "ext:deno_http/00_serve.js"; +import { serve, upgradeHttpRaw } from "ext:deno_http/00_serve.ts"; import { createHttpClient } from "ext:deno_fetch/22_http_client.js"; import { headersEntries } from "ext:deno_fetch/20_headers.js"; import { timerId } from "ext:deno_web/03_abort_signal.js"; diff --git a/ext/node/polyfills/http2.ts b/ext/node/polyfills/http2.ts index 023b6acd3..02e66e3da 100644 --- a/ext/node/polyfills/http2.ts +++ b/ext/node/polyfills/http2.ts @@ -36,7 +36,7 @@ import { } from "ext:deno_node/internal/stream_base_commons.ts"; import { FileHandle } from "node:fs/promises"; import { kStreamBaseField } from "ext:deno_node/internal_binding/stream_wrap.ts"; -import { serveHttpOnConnection } from "ext:deno_http/00_serve.js"; +import { serveHttpOnConnection } from "ext:deno_http/00_serve.ts"; import { nextTick } from "ext:deno_node/_next_tick.ts"; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { Duplex } from "node:stream"; -- cgit v1.2.3