lib/async/http/protocol/http1/client.rb in async-http-0.55.0 vs lib/async/http/protocol/http1/client.rb in async-http-0.56.0

- old
+ new

@@ -29,11 +29,11 @@ class Client < Connection # Used by the client to send requests to the remote server. def call(request, task: Task.current) Async.logger.debug(self) {"#{request.method} #{request.path} #{request.headers.inspect}"} - trailers = request.headers.trailers! + trailer = request.headers.trailer! # We carefully interpret https://tools.ietf.org/html/rfc7230#section-6.3.1 to implement this correctly. begin write_request(request.authority, request.method, request.path, @version, request.headers) rescue @@ -61,16 +61,16 @@ else task.async do |subtask| subtask.annotate("Streaming body.") # Once we start writing the body, we can't recover if the request fails. That's because the body might be generated dynamically, streaming, etc. - write_body(@version, body, false, trailers) + write_body(@version, body, false, trailer) end end elsif protocol = request.protocol write_upgrade_body(protocol) else - write_body(@version, body, false, trailers) + write_body(@version, body, false, trailer) end return Response.read(self, request) rescue # This will ensure that #reusable? returns false.