-
-
Notifications
You must be signed in to change notification settings - Fork 753
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
Support websocket.http.response ASGI extension #1907
Conversation
Co-authored-by: Marcelo Trylesinski <[email protected]>
Co-authored-by: Marcelo Trylesinski <[email protected]>
I don't see hypercorn sending any messages to the app: |
I don't have more comments here. Beautiful PR, beautiful tests. 👍 Thanks @kristjanvalur 🙏 For me, before approving:
|
2903570
to
d717e81
Compare
Please see test I am unable to silence the wsproto internal error which happens when it is trying to send a 500 error.
I've added a skip for the WSProto case, but maybe there is a better solution? |
62e63c5
to
d717e81
Compare
A separate question: The |
That would be great 👍 First ask the maintainer if he would accept such a PR, please 👀 |
We should have the analogous behavior that we have when using |
Co-authored-by: Marcelo Trylesinski <[email protected]>
Okay, I looked at the similar test for http ( for websockets, and the It is not a problem to modify the test for both cases. |
627ac6c
to
1edcc35
Compare
Turns out that we needed extra tests to check if response had been started before attempting to send a 500 response, similar to what is done in h11. |
seems like workflows are disabled 🤔 |
I cancelled a pipeline yesterday that it was not able to stop, maybe it's related to that. I don't know how to enable it again here. |
Weird, yes, the last time a workflow ran in this PR it timed out. |
You can try to reopen a new PR. 🤔 |
uvicorn now can return a response from websocket apps that choose to reject a connection with a custom response.
See https://github.com/encode/starlette/pull/2041/files for related work.
Note: The
websockets
module currently does not read the response body from a websockets upgrade requests, so we cannot effectively test that functionality, in the unittests. The exception thrown at the client contains no body, only status code.