mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-05-02 09:05:56 +03:00
[GH-ISSUE #2019] /batch/storage/v1 returns unexpected EOF for DELETE parts without body #244
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#244
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pohanhuang on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/2019
Context
remove_all)/batch/storage/v1(multipart/mixed withapplication/httpparts)Repro
Expected
Actual
http.ReadRequestfails withio.ErrUnexpectedEOF(missing body despiteContent-Lengthor missing\r\n\r\n), causing 400 responses in the batch.Proposal (minimal, safe)
In
handleBatchCall, add a lenient parse path forapplication/httpparts:Try
http.ReadRequestnormally.On
io.ErrUnexpectedEOFand methodDELETE, normalize once and retry:{}withContent-Length: 2for compatibility.Only applies to DELETE parts; no change for other methods.
Tests
Content-Length→ OK.@pohanhuang commented on GitHub (Sep 5, 2025):
Hi @fsouza,
while integrating OpenDAL, I ran into an issue where the fake server returns an error when handling a batch DELETE request without a body (unexpected EOF).
This change adds a small adjustment so that such requests are handled gracefully.
It should not affect existing behavior or the overall framework, but it makes the fake server easier to use as a test backend for OpenDAL.
Please let me know if this direction looks good — I’d be happy to adjust the patch if needed.