You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using a cloudflare worker as a proxy in front of a backend.
That backend can receive PUT requests with the Expect header set.
This is used, for example, by mvn commands when uploading files. See this section from the Maven documentation.
Observed behavior
The backend will correctly return the 100 Continue response code in order to receive the request body.
It seems that the worker "interprets" the 100 Continue response code as "the response has been sent". Thus, trying to read the request body after that ends up in an error (the backend will hit an unexpected EOF).
Expected behavior
The 100 Continue response code should not be considered as "the response has been sent" as the client will follow up with the request body.
[wrangler:inf] PUT /dummy.txt 503 Service Unavailable (2ms)
✘ [ERROR] Uncaught (async) TypeError: Can't read from request stream after responding with an exception.
The text was updated successfully, but these errors were encountered:
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler
What version(s) of the tool(s) are you using?
3.85.0 [Wrangler]
What version of Node are you using?
10.5.0[npm], v20.12.2[Node.js]
What operating system and version are you using?
Mac Sonoma 14.7.1
Describe the Bug
Context
We are using a cloudflare worker as a proxy in front of a backend.
That backend can receive PUT requests with the Expect header set.
This is used, for example, by mvn commands when uploading files. See this section from the Maven documentation.
Observed behavior
The backend will correctly return the
100 Continue
response code in order to receive the request body.It seems that the worker "interprets" the
100 Continue
response code as "the response has been sent". Thus, trying to read the request body after that ends up in an error (the backend will hit an unexpected EOF).Expected behavior
The
100 Continue
response code should not be considered as "the response has been sent" as the client will follow up with the request body.Steps to reproduce
Follow the steps that are described in: https://github.com/10io/wrangler-expect-header.
Please provide a link to a minimal reproduction
https://github.com/10io/wrangler-expect-header
Please provide any relevant error logs
The text was updated successfully, but these errors were encountered: