Open FelixFunk opened 3 weeks ago
As I understand the spec, Optional (but must not be empty); default is "ws".
should be read as if provided must not be empty, but optional, defaulting to ws
(if not provided).
It wouldn't hurt to set though if we can get it from the client_scheme
. Would it be something you'd be interested to add?
Ok that makes sense. I guess Hypercorn (which was built by a Quart developer) then sets it by default and Quart never checks because of it. Sorry for bothering you then.
Currently i am on vacation. Also I am fairly new to programming and have never added to a repo before, therefore I am not sure if I am the right fit for this. But I can have a look at it once I am back.
@FelixFunk Thanks for the reply. Don't feel obliged. Only take it on if that's something you'd enjoy. Have a good holiday!
Environment
python: 3.11.5 aiofiles==23.2.1 blinker==1.8.2 click==8.1.7 Flask==3.0.3 h11==0.14.0 h2==4.1.0 hpack==4.0.0 Hypercorn==0.17.3 hyperframe==6.0.1 itsdangerous==2.2.0 Jinja2==3.1.4 MarkupSafe==2.1.5 pathvalidate==3.2.1 priority==2.0.0 PyJWT==2.9.0 pyzmq==26.0.3 Quart==0.19.6 Quart-JWT-Extended==0.1.0 six==1.16.0 Werkzeug==3.0.3 wsproto==1.2.0
OS: OpenSUSE Tumbleweed Browser: Firefox 132.0.1
CMD
daphne run_service:quart_app -e ssl:44444:privateKey=../dev/ssl/key.pem:certKey=../dev/ssl/cert.pem
Issue
While running a Quart app i get the following stacktrace on a websocket request:
It seems like the 'scheme' property is missing for the websocket connection scope. I am not 100% sure if this issue belongs to daphne, since the asgi documentation marks 'scheme' as an optional setting. However, the documentation also states 'but must not be empty'. If this is indeed related to the Quart project i am really sorry for posting it here. I tested the same code with Hypercorn, so the actual request itself should not be an issue here.