Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-42527: Rewrite middleware as pure ASGI middleware #230

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

rra
Copy link
Member

@rra rra commented Jan 17, 2024

Rewrite CaseInsensitiveQueryMiddleware and XForwardedMiddleware as pure ASGI middleware rather than using the Starlette BaseHTTPMiddleware class. The latter seems to be behind some poor error reporting of application exceptions, has caused problems in the past due to its complexity, and is not used internally by Starlette middleware.

Rewrite CaseInsensitiveQueryMiddleware and XForwardedMiddleware
as pure ASGI middleware rather than using the Starlette
BaseHTTPMiddleware class. The latter seems to be behind some poor
error reporting of application exceptions, has caused problems
in the past due to its complexity, and is not used internally by
Starlette middleware.
@rra rra requested a review from jonathansick January 17, 2024 01:07
Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

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

Neat. Nice that it doesn't look too hard to write directly against ASGI here.

@rra rra merged commit 3ed26c8 into main Jan 17, 2024
6 checks passed
@rra rra deleted the tickets/DM-42527 branch January 17, 2024 19:30
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.

2 participants