Skip to content

test: drain request bodies before auth challenges - #490

Merged
yyuu merged 1 commit into
nahi:masterfrom
yyuu:ci/auth-post-body-drain
Nov 4, 2026
Merged

yyuu merged 1 commit into
nahi:masterfrom
yyuu:ci/auth-post-body-drain

Conversation

@yyuu

@yyuu yyuu commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Drain request bodies before Basic, Digest, and Digest-sess authentication can issue a challenge.
  • Add regression tests that verify the body is read before authentication.

Context

WEBrick can return an authentication challenge while a streamed upload is still unread. The connection may close before the client finishes sending the body, causing intermittent resets in multipart and IO-body POST tests.

Testing

  • Ruby 2.7 local: 3 regression tests / 6 assertions passed; Basic multipart and Digest IO POST: 2 tests / 3 assertions passed.
  • GitHub Actions run #41788803911: attempts 1 and 3 passed all 12 matrix jobs. Attempt 2 was canceled after the Ruby 2.7 job stopped reporting progress; the authentication tests and new regression tests passed before the stall.

@yyuu
yyuu marked this pull request as ready for review November 4, 2026 07:33
@yyuu

yyuu commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Test only fixes. Should be safe enough to just move on... 🤞

@yyuu
yyuu merged commit 4b08569 into nahi:master Nov 4, 2026
12 checks passed
@yyuu
yyuu deleted the ci/auth-post-body-drain branch November 4, 2026 07:37
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