lib/async/http/protocol/http1/server.rb in async-http-0.50.13 vs lib/async/http/protocol/http1/server.rb in async-http-0.51.0

- old
+ new

@@ -58,12 +58,13 @@ response = yield(request, self) return if @stream.nil? or @stream.closed? if response + trailers = response.headers.trailers! + write_response(@version, response.status, response.headers) - response.headers.trailers! body = response.body if body and protocol = response.protocol stream = write_upgrade_body(protocol) @@ -83,10 +84,9 @@ response = nil body.call(stream) else head = request.head? - trailers = response.trailers request = nil unless body response = nil write_body(@version, body, head, trailers)