Skip to content

Commit

Permalink
Only connection error if connection is a server
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeu2000 committed Nov 22, 2016
1 parent 73bb48f commit f52efc6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/http/2/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,9 @@ def receive(data)
else
case frame[:type]
when :headers
# When even-numbered stream identifier is received,
# When server receives even-numbered stream identifier,
# the endpoint MUST respond with a connection error of type PROTOCOL_ERROR.
if frame[ :stream ].even?
connection_error
end
connection_error if frame[:stream].even? && is_a?(Server)

# The last frame in a sequence of HEADERS/CONTINUATION
# frames MUST have the END_HEADERS flag set.
Expand Down

0 comments on commit f52efc6

Please sign in to comment.