Skip to content

fix: expect continue size cap - #11

Open
alanshaw wants to merge 1 commit into
ash/fix/compatibilityfrom
ash/fix/expect-continue-size-cap
Open

alanshaw wants to merge 1 commit into
ash/fix/compatibilityfrom
ash/fix/expect-continue-size-cap

Conversation

@alanshaw

@alanshaw alanshaw commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

A test uploads a 5 GiB + 1 part with the AWS SDK and expects an EntityTooLarge error. The sequence on the wire:

  1. The SDK sends the request headers with Expect: 100-continue, which it adds for any UploadPart over 2 MiB.
  2. fasthttp, which versitygw runs on, has no ExpectHandler configured, so it answers 100 Continue immediately, before any handler runs. The client starts streaming the body.
  3. versitygw's auth middleware then rejects on the declared Content-Length and returns the 400. fasthttp does not drain the unread body. The leftover body bytes are parsed as the next request, which fails, and the connection is closed.
  4. The client is still writing. If its read loop has already pulled the 400 off the socket, the test passes. If the connection reset arrives first, the kernel discards the unread 400 and the write fails with broken pipe. Go's HTTP transport does not recover a response after a write error, so the SDK reports a transport failure with no status code. That is the log line: StatusCode: 0 ... write: broken pipe, want EntityTooLarge.

alanshaw added a commit to fil-forge/ingot that referenced this pull request Sep 10, 2026
@alanshaw
alanshaw force-pushed the ash/fix/expect-continue-size-cap branch 2 times, most recently from 6c4d0e8 to c8779b0 Compare September 10, 2026 15:49
@alanshaw
alanshaw force-pushed the ash/fix/compatibility branch 2 times, most recently from 24fbf04 to 9c26479 Compare September 10, 2026 20:10
@alanshaw
alanshaw force-pushed the ash/fix/expect-continue-size-cap branch 2 times, most recently from 83d18b5 to 17b6100 Compare September 11, 2026 08:32
@alanshaw
alanshaw force-pushed the ash/fix/expect-continue-size-cap branch from 17b6100 to d3e7e80 Compare September 11, 2026 09:56
@alanshaw
alanshaw added this pull request to stack #14 September 14, 2026 12:22
@alanshaw
alanshaw removed this pull request from stack #14 October 9, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant