-
Notifications
You must be signed in to change notification settings - Fork 73
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
Unable to integrate asgi3 middlewares #263
Comments
Using https://github.com/encode/starlette/blob/b8ea367b4304a98653ec8ce9c794ad0ba6dcaf4b/starlette/middleware/base.py as reference, if I change the function to:
I get so somewhere |
Hi @virajkanwade, I suspect that it won't be possible to add support for ASGI middlewares to BlackSheep, because it really needs to handle instances of |
Found a sample code for Starlette. Inside the sample asgi3 middleware def call:
Similar call stack for Blacksheep application call
|
key areas of interest starlette:
blacksheep:
As you can see, blacksheep too gets the same scope, receive and send as starlette in application.call. |
starlette:
blacksheep:
Here too scope is similar in both. |
Describe the bug
A description of what the bug is, possibly including how to reproduce it.
I am trying to include SentryAsgiMiddleware.
I have to hack it a little as per the known issue as:
But the problem arrises when a URL is actually called.
TypeError: SentryAsgiMiddleware._run_asgi3() missing 1 required positional argument: 'send'
The text was updated successfully, but these errors were encountered: