fix: HEAD method not handled properly (#3563)

- It should never contain a response body
- It should be equivalent to `GET`
This commit is contained in:
Marvin Hagemeister
2025-10-21 15:43:17 +02:00
committed by GitHub
parent de1810e70d
commit 41b9422dd1
4 changed files with 91 additions and 8 deletions
+4
View File
@@ -439,6 +439,10 @@ export class App<State> {
);
}
if (method === "HEAD") {
return new Response(null, result);
}
return result;
} catch (err) {
ctx.error = err;