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:
@@ -439,6 +439,10 @@ export class App<State> {
|
||||
);
|
||||
}
|
||||
|
||||
if (method === "HEAD") {
|
||||
return new Response(null, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
} catch (err) {
|
||||
ctx.error = err;
|
||||
|
||||
Reference in New Issue
Block a user