Hi, thanks for the excellent test suites. I got some questions from running it against my websocket server implementation.
- Origin Header in websocket request
My server by default requires that Origin matches Host. This seems to be a sensible default for most server applications. Maybe it would be a good idea for autobahn to set Origin header in websocket request that matches Host?
- Case 2.10 - consecutive Ping frames
My server receives 10 consecutive pings in one round of parsing; responds with only one Pong (for the last Ping). This conforms to the spec (5.5.3), and arguably is better than responding with 10 consecutive Pongs.
Maybe autobahn could add some delays between pings, so that servers will not consolidate them?
- Consecutive frames
In case 3.2, my server sees an invalid frame before it can respond to the prev text message. The behavior is considered as ‘NON-STRICT’ by autobahn. But I think it’s perfectly valid to peek ahead to see the error and close connection immediately. Maybe autobahn could add some delays between frames?
As far as I see, this applies to case 3.2 / 4.1.3 / 4.1.4 / 4.2.3 / 4.2.4 / 5.15
- Case 7.1.5 - close frame in the middle of a message
My server considers this as an error and drops the connection uncleanly. I cannot find in the spec how it should be treated; is it required that the server sends a close frame?
- Invalid UTF-8
My server does not yet parse UTF-8 bytes, it just blindly echoes back the raw bytes. To my surprise, all 6.. case are passed:) For example in case 6.3.1
002 TX FRAME : OPCODE=1, FIN=True, RSV=0, PAYLOAD-LEN=20, MASK=1ef3056a, PAYLOAD-REPEAT-LEN=None, CHOPSIZE=None, SYNC=False
005 RX OCTETS: 8114cebae1bdb9cf83cebcceb5eda080656469746564
008 RX FRAME : OPCODE=1, FIN=True, RSV=0, PAYLOAD-LEN=0, MASKED=False, MASK=None
009 RX OCTETS: 8800
010 RX FRAME : OPCODE=8, FIN=True, RSV=0, PAYLOAD-LEN=0, MASKED=False, MASK=None
011 TCP DROPPED BY PEER
In these cases, if the server responds with invalid UTF-8 bytes, autobahn would consider the test passed? That seems to be incorrect.