lib/pitchfork/http_response.rb in pitchfork-0.14.0 vs lib/pitchfork/http_response.rb in pitchfork-0.15.0
- old
+ new
@@ -69,11 +69,13 @@
end
if hijack
req.hijacked!
hijack.call(socket)
- else
+ elsif body.respond_to?(:each)
body.each { |chunk| socket.write(chunk) }
+ else
+ body.call(socket)
end
end
end
end