You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to rfc6455 section 11.1.1, a "ws" URI Scheme supports a query component with the URI scheme syntax "ws:" "//" authority path-abempty [ "?" query ].
While the query component can be defined in ClienSession.request using the params argument, this argument is absent from ClientSession.ws_connect.
This requires users of ws_connect to build and embed the query component in the url agument of `ws_connect.
The expected result is a response for the url http://example.org/ws?key1=value1&key2=value2.
Using the example target, this would give:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "<input>", line 4, in do
File "/home/hugo/Repos/Aleph/aiohttp/aiohttp/client.py", line 1072, in __aenter__
self._resp = await self._coro
File "/home/hugo/Repos/Aleph/aiohttp/aiohttp/client.py", line 755, in _ws_connect
raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 404, message='Invalid response status', url=URL('http://example.org/ws?key1=value1&key2=value2')
Logs/tracebacks
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in runreturn loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_completereturn future.result()
File "<input>", line 4, in doTypeError: ws_connect() got an unexpected keyword argument 'params'
### Python Version
```console
Python 3.8.8
aiohttp Version
aiohttp master on commit 3d73221072c350d973b2fb0c54c78ad30863d433
Describe the bug
According to rfc6455 section 11.1.1, a "ws" URI Scheme supports a query component with the URI scheme syntax
"ws:" "//" authority path-abempty [ "?" query ]
.While the query component can be defined in
ClienSession.request
using theparams
argument, this argument is absent fromClientSession.ws_connect
.This requires users of
ws_connect
to build and embed the query component in theurl
agument of `ws_connect.To Reproduce
Try running the following example:
Expected behavior
The expected result is a response for the url
http://example.org/ws?key1=value1&key2=value2
.Using the example target, this would give:
Logs/tracebacks
aiohttp Version
aiohttp master on commit 3d73221072c350d973b2fb0c54c78ad30863d433
multidict Version
yarl Version
OS
Linux 5.10.0-7-amd64 #1 SMP Debian 5.10.40-1 (2021-05-28) x86_64 GNU/Linux
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: