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

- old
+ new

@@ -59,10 +59,11 @@ return if @stream.nil? or @stream.closed? if response write_response(@version, response.status, response.headers) + response.headers.trailers! body = response.body if body and protocol = response.protocol stream = write_upgrade_body(protocol) @@ -82,14 +83,15 @@ response = nil body.call(stream) else head = request.head? + trailers = response.trailers request = nil unless body response = nil - write_body(@version, body, head) + write_body(@version, body, head, trailers) end else # If the request failed to generate a response, it was an internal server error: write_response(@version, 500, {}) write_body(@version, nil)