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
-
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.starlette/starlette/responses.py
Lines 151 to 154 in 4e453ce
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