-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close codes 1012 and 1013 are valid #52
Comments
1012 and 1013 are not in RFC6455, which is what the test suite tests. But these 2: yeah, one could argue it's nevertheless registered. So I would call it a bug.
If it is not an official extension, you can't use those reserved codes: "1000-2999 Standards Action, Specification Required or IESG Review" If you are developing an unofficial extension, there are number ranges to use: "4000-4999 Reserved for Private Use" I think the test suite does probe these .. not sure though right now. |
Right, I agree -- but as a library maintainer I can't very well know who is using my module in an "official" vs. "unofficial" capacity. |
Yes, and as a test suite developer, we can't provide test cases for unknown extensions;) Seriously: e.g. say you introduce new opcodes, complete new semantics etc .. a general testsuite can't do that. The testsuite has stuff for the now official WebSocket compression extension, and that's it. In any case: when your library is NOT used for writing an extension, but for plain WS, you want (?) to have it conform to the strict letter. And if you want to support your library being used like this, it should have a mode "simple user mode" for that? If you would provide that, you could publish reports for that mode only. Which would make sense IMO. |
Yes, I think so too. I'll go down that route, in which case this issue is now only for the new(er) codes 1012 and 1013. Thanks for the input! |
RFC6455 - Section 11.7 - WebSocket Close Code Number Registry http://tools.ietf.org/html/rfc6455#section-11.7 That references the close code number registry. Which was proposed in the hybi mailing list on May 16, 2012 (which was 5 months after RFC6455) Most implementations in the wild already know what these 2 close codes are and consider them part of the standard implementation for websocket (even chrome and firefox!) |
fixed in the new release: https://pypi.python.org/pypi/autobahntestsuite/0.7.5 |
Works great; thanks! As an aside, that patch changed the test numbers (e.g. |
Regarding test case numbers: I think the unfortunate turth might be that we never really talked about what kind of stability in the produced reports the test suite claims to provide=( Which of course is an issue. In the particular case, simply removing the tested values (and forgetting to add them on the "positive" list of tested values;) made the test numbers shift. An alternative would be: skip the originally tested values - the test case will appear as "missing". Essentially, we could have a list of "deprecated test numbers" somewhere in the code which are then skipped automatically. |
I think I would (eventually) prefer this approach, once you decide on a "stable" test interface. I was not affected by it for this patch, though, so no worries! |
I am getting ProtocolError With close Code 1000 and Message is Empty, any one come across issue. If so could you tell me the reason for the issue. |
TestSuite currently fails my library because it does not reject the following codes:
The rationale, I assume, is that anything reserved and not defined by RFC 6455 is considered "invalid". This puts me in an interesting position, though: if my library hardcodes these undefined opcodes to reject them, no one will be able to use it to design new extensions that use new opcodes.
I could always have a "developer mode" for the library that lets undefined opcodes through, and switch it off when running TestSuite. But that's further muddied by the fact that codes 1012 and 1013 are, in fact, defined as of May 2012.
Does Autobahn have a policy for evolving with new opcode definitions, and/or has there been any discussion on allowing a more relaxed test mode?
The text was updated successfully, but these errors were encountered: