about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/kcar/response.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/kcar/response.rb b/lib/kcar/response.rb
index 4b90883..6f151e5 100644
--- a/lib/kcar/response.rb
+++ b/lib/kcar/response.rb
@@ -107,9 +107,8 @@ class Response < Struct.new(:sock, :hdr, :unchunk, :buf, :parser)
     # since Rack does not provide a way to explicitly send trailers
     # in the response, we'll just yield a stringified version to our
     # server and pretend it's part of the body.
-    if trailers = parser.extract_trailers(hdr)
-      yield(trailers.map! { |k,v| "#{k}: #{v}\r\n" }.join("") << "\r\n")
-    end
+    trailers = parser.extract_trailers(hdr)
+    yield(trailers.map! { |k,v| "#{k}: #{v}\r\n" }.join("") << CRLF)
   end
 
   def each_until_eof(&block)