-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace BaseHTTPMiddleware with pure ASGI middleware #173
Replace BaseHTTPMiddleware with pure ASGI middleware #173
Conversation
Hello, thanks for your contribution. I'll try to get to it this week, but would you mind fixing the linting errors in the meantime? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Hey I'm working on reviewing this right now, is there any reference for why we're moving away from this? I'm going through the documentation and I can't see anything on it or the recommended approach. |
Alright, I see the issue you linked, I'll track there |
Please check out the warnings in this section of the docs: https://www.starlette.io/middleware/#basehttpmiddleware BaseHTTPMiddleware has bugs that we don't think can be fixed. We may deprecate it in the future (although that's not finalized), but as a first step we want to discourage its usage especially in libraries. |
This project isn't a library, but we're happy to help where we can 👍. |
Co-authored-by: Hassan Abouelela <abouelelahassan@gmail.com>
Everything looks fine, thanks for your contribution. Is there an ETA on when the docs will be updated? It's really difficult to deal with this as is. |
What part of the docs are giving you trouble / would you like updated? |
The largest issue right now is that they aren't merged, so no one will know where to look for them. This is only a temporary problem of course, but if you plan on making this same migration on projects where they need to edit the middleware more frequently, that can be a blocker. More relevantly, there are a few minor things here and there. In no particular order:
|
Hi, I am a Starlette dev. We are trying to discourage usage of BaseHTTPMiddleware.