Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Precise the behaviour of "Failed immediately the connection" #5

Lawouach opened this Issue Mar 25, 2012 · 3 comments


None yet
3 participants

I'm running your test suite against ws4py and I have a few test which are marked as failed because autobahn expects a connection to be immediately failed. Unfortunately it's unclear as to what this means.

The spec distinguishes between Failing and Aborting the connection. The former respects the closing handshake but is simply initiated due to an error whereas the later doesn't run the closing handshake at all but close the underlying connection directly.

I currently do not understand what AutobahnTestsuite expects here. For instance, case 6.6.1 requires the connection to be failed immediately because of an invalid UTF-8 payload. The spec says that in case of invalid UTF-8 the connection should be failed, not aborted.


So what is expected from the testsuite?

See some results at http://www.defuze.org/oss/ws4py/testreports/servers/0.2.1/


zaphoyd commented Mar 25, 2012

Some more info on your other issue here: tavendo/AutobahnPython#103 (comment)

With respect to test 6.6.1 on the report you linked to.. which of these servers is ws4py? The two that fail 6.6.1 are CherryPy and gevent 1.0.0b. Both fail it in the same way, and that is actually erroneously echoing the invalid UTF8 payload rather than dropping or closing the connection.

ws4py runs the exact same code in both cases, gevent and CherryPy are only used as the HTTP server performing the initial handshake. The sole difference is that with CherryPy, the websocket connection will run in a regular thread whereas with gevent it'll run in a greenlet.

The reports include autobahn and tornado for comparison :)


oberstet commented Mar 25, 2012

I really don't see how the same code would be running here: if you look at the wirelogs for 6.6.1, Tornado will drop the TCP (not nice, but correct), Autobahn (correct) will perform closing handshake with correct code 1007, and the other 2 echo back the invalid message.

[Sidenote: Autobahn in "production mode", also fails by dropping TCP for security reasons. But you can configure it]

The bug with AB test suite is: it should make CherryPy and gevent a complete fail of the case, not only closed by wrong endpoint. This is the same as tavendo/AutobahnPython#103. I hence close this issue, and leave the other open so that AB test suite can be improved. But it won't get greener, only more red then .. for CherryPy/gevent in this particular case.

Rgd Tornado: as far as I know they do their own UTF8 validation .. they use whats built into Python. That is buggy. There seem to be no motivation to fix it. facebook/tornado#472 (comment)

@oberstet oberstet closed this Mar 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment