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
h2spec fix 5.1.1. Stream Identifiers #83
Conversation
× Sends even-numbered stream identifier - The endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
1 similar comment
@@ -226,6 +226,12 @@ def receive(data) | |||
else | |||
case frame[:type] | |||
when :headers | |||
# When even-numbered stream identifier is received, | |||
# the endpoint MUST respond with a connection error of type PROTOCOL_ERROR. | |||
if frame[ :stream ].even? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, wouldn't this break client apps? As in, connection.rb is used by both client and server classes, and this check effectively forces client-only code path for header processing.
Sorry, I forgot to run the http-2 specs. I made an update but wasn't sure what you meant by
|
BTW, it's difficult to track how many and which h2specs are passing and failing. I think we need a formatter to concisely list the failures... |
@@ -226,6 +226,10 @@ def receive(data) | |||
else | |||
case frame[:type] | |||
when :headers | |||
# When server receives even-numbered stream identifier, | |||
# the endpoint MUST respond with a connection error of type PROTOCOL_ERROR. | |||
connection_error if frame[:stream].even? && is_a?(Server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Minor nitpick (surprised rubocop didn't complain): https://github.com/georgeu2000/http-2/blob/f52efc656619f5f05b4f69e203f2ffd1ae4bd10e/lib/http/2/connection.rb#L638 - for consistency, can we self.is_a?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
Regarding h2spec, perhaps a better solution is to save the output to a file. Then a diff (commit) will show what is fixed and what is broken. |
2 similar comments
@igrigorik - Haven't heard back so I guess it is OK. Merging... |
👍 |
73 tests, 33 passed, 0 skipped, 40 failed