Possible error in AutobahnTestSuite Test case 7.7.9

#1

Greetings.

I wonder if the 7.7.9 case of Autobahn test suite is a valid one?

Here’s the test itself:

Case Description
Send close with valid close code 1011
Case Expectation
Clean close with normal or echoed code

The point is that as per RFC6455 status code 1011 is supposed to be sent by server and not by client:

1011
1011 indicates that a server is terminating the connection because
it encountered an unexpected condition that prevented it from
fulfilling the request.

While RFC doesn’t prohibit client from sending this error code the description clearly states that “the server is terminating the connection”, not the client (which is the test suite in this case).

Even though all the mature server implementations pass this test I wonder whether it is valid at all? What was the rationale for this test?

With best regards, Ihor

0 Likes

#2

Close code 1011 was added in response to the discussion started here:

http://www.ietf.org/mail-archive/web/hybi/current/msg09234.html

The motivation was to have a specific close code for "internal error".

"Internal error" can be experienced by server and client, and hence - IMHO - should be used by both servers and clients to signal that.

The RFC is unfortunately using wording which only refers to servers .. which is (my interpretation) not what was originally intended.

Formally, you are right when reading the spec to the letter: it's a grey area: the spec simply does not say anything about clients sending 1011.

\Tobias

···

Am 19.04.2012 15:37, schrieb Ihor Kaharlichenko:

Greetings.

I wonder if the 7.7.9 case of Autobahn test suite is a valid one?
Here's the test itself:

    *Case Description*
    Send close with valid close code 1011
    *Case Expectation*
    Clean close with normal or echoed code

The point is that as per RFC6455
<http://tools.ietf.org/html/rfc6455#section-7.4> status code 1011 is
supposed to be sent by server and not by client:

    1011
    1011 indicates that a server is terminating the connection because
    it encountered an unexpected condition that prevented it from
    fulfilling the request.

While RFC doesn't prohibit client from sending this error code the
description clearly states that "the server is terminating the
connection", not the client (which is the test suite in this case).

Even though all the mature server implementations pass this test I
wonder whether it is valid at all? What was the rationale for this test?

With best regards, Ihor

0 Likes