-
Notifications
You must be signed in to change notification settings - Fork 31
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
Revamp implementation without BaseHTTPMiddleware #41
Revamp implementation without BaseHTTPMiddleware #41
Conversation
The deprecation is not decided yet... But the motivation for changing the implementation is valid. 👍 |
The deprecation has now been decided. I would recommend moving forward with this. |
Looks like this project is no longer maintained. Interested in forking and updating the package? @frankie567 |
I appreciate your trust, but I'm already involved in several packages and projects, not sure I can commit to support another one |
Fair enough. Ok, with you if your suggestions is used as the base for the new project? |
Of course, that's open source! |
Hello there 👋
Because of the numerous limitations of the
BaseHTTPMiddleware
class provided by Starlette, the Starlette dev' team is about to deprecate it and encourage people to write "pure" ASGI middlewares. In particular, one of this limitation causes the issue #33 here.This PR is an attempt at converting the existing middleware without
BaseHTTPMiddleware
. The resulting code is quite similar, the only "tricky" thing is the part where we wrap thesend
function with our own; as it's the common way to do in ASGI.All existing tests are passing.
I would be glad to discuss it and make all changes needed so we can integrate this new approach in the library.
Cheers!