vercel: Middleware edge functions do not support POST request with "Expect: 100-continue" HTTP header
Steps to reproduce:
- Add any valid
_middleware.tsto a NextJS application. - Deploy to Vercel
- Make a POST request to any url where that middleware will be run with:
Expect: 100-continueas an HTTP header, and any non-emptybodycontent.
Result:
We get a 502 Bad Gateway with the following response body:
An internal error occurred with Vercel.
INTERNAL_EDGE_FUNCTION_CONNECTION_CLOSED
In the function log, we get a message that the middleware was called, but the code does not execute (adding a console.info in the middleware does not show up in the function log)
Expected result:
Middleware and page or api executes appropriately.
Expect: 100-continue is part of the HTTP 1.1 spec and should be implemented, or should be documented explicitly as not implemented.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 6
- Comments: 29
👋 We are having the same issue since 12hours ago as well. Seems like POST requests from some locations (confirmed via VPN for the UK) run into a 502 - INTERNAL_EDGE_FUNCTION_CONNECTION_CLOSED
From other parts of the world we do not see such a problem