Skip to content
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

Support 1012, 1013 and 1014 WebSocket close status code #8664

Merged
merged 1 commit into from Dec 17, 2018

Conversation

slandelle
Copy link
Contributor

Motivation:

RFC 6455 doesn't define close status codes 1012, 1013 and 1014.
Yet, since then, IANA has defined them and web browsers support them.

From https://www.iana.org/assignments/websocket/websocket.xhtml:

  • 1012: Service Restart
  • 1013: Try Again Later
  • 1014: The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.

Modification:

Make status codes 1012, 1013 and 1014 legit.

Result:

WebSocket status codes as defined by IANA are supported.

@slandelle
Copy link
Contributor Author

slandelle commented Dec 14, 2018

Investigating if autobahn test suite can support those new codes.

[ERROR] Failed to execute goal me.normanmaurer.maven.autobahntestsuite:autobahntestsuite-maven-plugin:0.1.4:fuzzingclient (default) on project netty-testsuite-autobahn: 
[ERROR] Failed test cases:
[ERROR] 	[7.9.8] behavior: FAILED, behaviorClose: WRONG_CODE, duration: 2ms, remoteCloseCode: 1014, reportFile: target/autobahntestsuite-reports/autobahntestsuite_maven_plugin_case_7_9_8.json
[ERROR] 	[7.9.6] behavior: FAILED, behaviorClose: WRONG_CODE, duration: 2ms, remoteCloseCode: 1012, reportFile: target/autobahntestsuite-reports/autobahntestsuite_maven_plugin_case_7_9_6.json
[ERROR] 	[7.9.7] behavior: FAILED, behaviorClose: WRONG_CODE, duration: 2ms, remoteCloseCode: 1013, reportFile: target/autobahntestsuite-reports/autobahntestsuite_maven_plugin_case_7_9_7.json

@netty-bot
Copy link

Can one of the admins verify this patch?

@normanmaurer
Copy link
Member

@slandelle seems like it is "fixed" in recent releases of Autobahntestsuite:

crossbario/autobahn-testsuite#88
crossbario/autobahn-testsuite#52

Let me release an updated version of the maven autobahn testsuite plugin.

@slandelle
Copy link
Contributor Author

Great!
Please note that I did’t add 1015 as a valid code.
One the one side, I probably should to stick to the spec.
On the other side, I don’t get how one could get a websocket frame in case of a TLS handshake error. Sadly, the links on the IANA page to the related mailing list are dead.
WDYT?

@normanmaurer
Copy link
Member

@slandelle yeah... I think what you did is good enough for now...

Motivation:

RFC 6455 doesn't define close status codes 1012, 1013 and 1014.
Yet, since then, IANA has defined them and web browsers support them.

From https://www.iana.org/assignments/websocket/websocket.xhtml:

* 1012: Service Restart
* 1013: Try Again Later
* 1014: The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.

Modification:

Make status codes 1012, 1013 and 1014 legit.

Result:

WebSocket status codes as defined by IANA are supported.
@slandelle
Copy link
Contributor Author

@normanmaurer What's the command for triggering CI, please?

@normanmaurer
Copy link
Member

@netty-bot test this please

@slandelle

@slandelle
Copy link
Contributor Author

Thanks!

@normanmaurer normanmaurer self-requested a review December 17, 2018 18:42
@normanmaurer normanmaurer merged commit 302dac8 into 4.1 Dec 17, 2018
@normanmaurer normanmaurer deleted the additional-ws-close-status branch December 17, 2018 18:42
normanmaurer pushed a commit that referenced this pull request Dec 17, 2018
Motivation:

RFC 6455 doesn't define close status codes 1012, 1013 and 1014.
Yet, since then, IANA has defined them and web browsers support them.

From https://www.iana.org/assignments/websocket/websocket.xhtml:

* 1012: Service Restart
* 1013: Try Again Later
* 1014: The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.

Modification:

Make status codes 1012, 1013 and 1014 legit.

Result:

WebSocket status codes as defined by IANA are supported.
@normanmaurer
Copy link
Member

@slandelle thanks... merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants