Skip to content

Conversation

@jimkont
Copy link
Contributor

@jimkont jimkont commented Oct 24, 2025

After body events are consumed for authentication, the middleware's _fake_receive function now delegates to the original receive callable instead of returning None.

This allows downstream applications to properly receive lifecycle events like http.disconnect, enabling proper cleanup for SSE connections, streaming responses, and other long-lived HTTP connections.

Adds test to verify that _fake_receive correctly delegates to original receive after body events are exhausted.

After body events are consumed for authentication, the middleware's
_fake_receive function now delegates to the original receive callable
instead of returning None.

This allows downstream applications to properly receive lifecycle events
like http.disconnect, enabling proper cleanup for SSE connections,
streaming responses, and other long-lived HTTP connections.

Adds test to verify that _fake_receive correctly delegates to original
receive after body events are exhausted.
@jimkont jimkont force-pushed the fix/support-sse-connections branch from e7c296b to 2cd2356 Compare October 24, 2025 08:44
Copy link
Contributor

@ejinotti-mdsol ejinotti-mdsol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice find! please also bump the version in pyproject.toml and add a changelog entry.

@ejinotti-mdsol ejinotti-mdsol merged commit 219dfe6 into main Oct 24, 2025
17 checks passed
@ykitamura-mdsol ykitamura-mdsol deleted the fix/support-sse-connections branch October 24, 2025 13:21
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.

3 participants