Can not use send_denial_response
with StreamingResponse
#2566
Unanswered
WSH032
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
If we use
FileResponse
orStreamingResponse
when sending the Websocket Denial Response, aRuntimeError
will occur.To Reproduce
Steps to reproduce the behavior:
Expected behavior
FileResponse
andStreamingResponse
override the__call__
method, but they do not add the"websocket."
prefix like the parent classResponse
does.https://github.com/encode/starlette/blob/4e453ce91940cc7c995e6c728e3fdf341c039056/starlette/responses.py#L151-L154
If this is expected behavior, I didn't see any relevant information in the documentation, and at least the type checker didn't raise any errors
Configuration
Beta Was this translation helpful? Give feedback.
All reactions