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
With an aiohttp.ClientSession and ws_connect to an embedded data acquisition device, my application got a message of type aiohttp.MsgType.error:
Message(tp=<MsgType.error: 21>, data=WebSocketError('Received new fragment frame with non-zero opcode 0',), extra=None)
Which is generated in websocket.py parse_frame:
``'python
if fin == 0 and opcode == OPCODE_CONTINUATION and not continuation:
raise WebSocketError(
CLOSE_PROTOCOL_ERROR,
'Received new fragment frame with non-zero '
'opcode {!r}'.format(opcode))
## Expected behaviour
Provide a self-consistent error message. Possibly correct some logic. (It's very believable that the embedded device is actually sending bad frames.)
## Actual behaviour
Given that OPCODE_CONTINUATION = 0x0, the only message this block of code can deliver is that there's a non-zero opcode of constant value zero...
## Steps to reproduce
<!-- Please describe steps to reproduce the issue.
If you have a script that does that please include it here within
markdown code markup -->
## Your environment
Observed in aiohttp-0.21.6, this function does not appear to have any changes in the latest code.
The text was updated successfully, but these errors were encountered:
Verified with tcpdump that the peer incorrectly inserted two octets of zero in the TCP stream.
Suggest replacing the error message "Received new fragment frame with non-zero opcode {!r}." with "Received continuation fragment as start of new frame."
Sorry, I think the value for proposed change is not high, new text is still now clean.
It means "something is broken in protocol structure", nothing more.
I believe the error is very rare, thus I want to do nothing with it.
Long story short
With an aiohttp.ClientSession and ws_connect to an embedded data acquisition device, my application got a message of type aiohttp.MsgType.error:
Which is generated in websocket.py parse_frame:
``'python
if fin == 0 and opcode == OPCODE_CONTINUATION and not continuation:
raise WebSocketError(
CLOSE_PROTOCOL_ERROR,
'Received new fragment frame with non-zero '
'opcode {!r}'.format(opcode))
The text was updated successfully, but these errors were encountered: