-
Notifications
You must be signed in to change notification settings - Fork 86
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
BaseHTTPMiddleware vs BackgroundTasks #20
Comments
Async Python is a complete black box for me I have zero experience with so far (except the little bit I interact with it in FastAPI). So if you know a way to refactor the code, please go on. Would be awesome |
I've found a very insightful article yesterday: https://florimond.dev/blog/articles/2019/08/introduction-to-asgi-async-python-web/ But anyway, thank you. I'll be working on it then (it should not be many changes, only focused on the middleware interface). |
Oh, I see @Kludex is also working on resolving the original issue in Starlette. |
Should I understand the Starlette PR is doomed 😅 ? |
I'm bothering ppl to review it... 😅 |
Hi all, Does anybody have/tested a workaround, like: encode/starlette#919 (comment) ? thanks |
This was already fixed here. |
@trallnag I've just noticed that we use
@app.middleware('http')
here, I should have been able to catch this earlier... Anyway, that decorator is implemented on top ofBaseHTTPMiddleware
, which has a problem: encode/starlette#919Solution: change the implementation to a pure ASGI app/middleware.
PS.: I can open a PR with it, jfyk.
The text was updated successfully, but these errors were encountered: