next.js
50c3b98e - Return 405 for Fetch-forbidden Route Handler methods (#102709)

Commit
2 days ago
Return 405 for Fetch-forbidden Route Handler methods (#102709) ### What? Return 405 for TRACE requests to App Router Route Handlers instead of 500. ### Why? Fetch forbids TRACE, TRACK, and CONNECT. Constructing a NextRequest with one of these methods throws before method dispatch can reject it. ### How? Reject these methods before constructing the Fetch request. Keep the existing statuses for other invalid and unimplemented methods. ### Verification - The TRACE regression and existing invalid/unimplemented method checks passed in Turbopack dev/start, Switchyard, and Webpack dev. - Repository TypeScript and focused ESLint checks passed. - Deployment tests were not run: this task explicitly excludes deployments. <!-- NEXT_JS_LLM -->
Author
Parents
Loading