lib/http/2/stream.rb in http-2-0.10.0 vs lib/http/2/stream.rb in http-2-0.10.1

- old
+ new

@@ -113,10 +113,18 @@ emit(:promise_headers, frame[:payload]) unless frame[:ignore] when :priority process_priority(frame) when :window_update process_window_update(frame) - when :altsvc, :blocked + when :altsvc + # 4. The ALTSVC HTTP/2 Frame + # An ALTSVC frame on a + # stream other than stream 0 containing non-empty "Origin" information + # is invalid and MUST be ignored. + if !frame[:origin] || frame[:origin].empty? + emit(frame[:type], frame) + end + when :blocked emit(frame[:type], frame) end complete_transition(frame) end