Skip to content

Add timeout to OIDC HTTP response body read#1232

Merged
lovasoa merged 8 commits intomainfrom
fix/oidc-body-read-timeout
Mar 8, 2026
Merged

Add timeout to OIDC HTTP response body read#1232
lovasoa merged 8 commits intomainfrom
fix/oidc-body-read-timeout

Conversation

@lovasoa
Copy link
Collaborator

@lovasoa lovasoa commented Mar 8, 2026

Adds a 5s timeout on OIDC HTTP response body reads. Without this, a provider that sends headers but stalls the body causes response.body().await to hang forever, freezing all requests.

Fixes #1231

lovasoa and others added 8 commits March 8, 2026 02:52
A stalled OIDC provider that sends HTTP headers but never completes the
body would cause response.body().await to hang forever, freezing the
entire SQLPage process. Add a 5-second timeout on the body stream read
using awc's ClientResponse::timeout().

Fixes #1231

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the Notify synchronization and yield_now() calls. Instead,
use a small real-time sleep for TCP to complete, then pause+advance
tokio time. Assert the actual response status instead of is_finished().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lovasoa lovasoa merged commit 431ab87 into main Mar 8, 2026
14 checks passed
@lovasoa lovasoa deleted the fix/oidc-body-read-timeout branch March 8, 2026 02:55
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.

Slow OIDC provider permanently freezes all request handling

1 participant