diff --git a/src/adapters/node/event.ts b/src/adapters/node/event.ts index c83a31f8..99108471 100644 --- a/src/adapters/node/event.ts +++ b/src/adapters/node/event.ts @@ -17,8 +17,6 @@ export class NodeEvent implements RawEvent { _req: NodeIncomingMessage; _res: NodeServerResponse; - _handled?: boolean; - _originalPath?: string | undefined; _rawBody?: Promise; @@ -125,7 +123,7 @@ export class NodeEvent implements RawEvent { // -- response -- get handled() { - return this._handled || this._res.writableEnded || this._res.headersSent; + return this._res.writableEnded || this._res.headersSent; } get responseCode() { diff --git a/src/adapters/web/event.ts b/src/adapters/web/event.ts index d4965e73..82efc54d 100644 --- a/src/adapters/web/event.ts +++ b/src/adapters/web/event.ts @@ -6,8 +6,6 @@ export class WebEvent implements RawEvent { _req: Request; - _handled?: boolean; - _path?: string; _originalPath?: string | undefined; @@ -106,10 +104,6 @@ export class WebEvent implements RawEvent { // -- response -- - get handled() { - return this._handled; - } - get responseCode() { return this._responseCode || 200; } @@ -155,7 +149,6 @@ export class WebEvent implements RawEvent { } writeHead(code: number, message?: string) { - this._handled = true; if (code) { this.responseCode = code; } diff --git a/src/handler.ts b/src/handler.ts index c83838c9..f5b22f95 100644 --- a/src/handler.ts +++ b/src/handler.ts @@ -86,9 +86,6 @@ async function _callHandler< if (hooks.onRequest) { for (const hook of hooks.onRequest) { await hook(event); - if (event[_kRaw].handled) { - return; - } } } const body = await handler(event); diff --git a/src/types/event.ts b/src/types/event.ts index 6889fc6a..84acd6b4 100644 --- a/src/types/event.ts +++ b/src/types/event.ts @@ -48,8 +48,6 @@ export interface RawEvent { // -- Response -- - readonly handled: boolean | undefined; - responseCode: number | undefined; responseMessage: string | undefined;