class Async::HTTP::Protocol::HTTP2
def generate_response(request, stream, &block)
def generate_response(request, stream, &block) ed to close the stream if the user code blows up while generating a response: e = begin request, stream) .close(:internal_error) onse s = Headers::Merged.new({ S => response.status, ponse.headers) ponse.body.nil? or response.body.empty? m.headers(headers, end_stream: true) nse.body.read if response.body m.headers(headers, end_stream: false) nse.body.each do |chunk| am.data(chunk, end_stream: false) m.data("", end_stream: true) .close(:internal_error) unless stream.state == :closed ogger.error(request) {$!}