lib/ftw/request.rb in ftw-0.0.11 vs lib/ftw/request.rb in ftw-0.0.13
- old
+ new
@@ -70,9 +70,17 @@
#
def execute(connection)
tries = 3
begin
connection.write(to_s + CRLF)
+
+ if body?
+ if body.is_a?(String)
+ connection.write(body)
+ else
+ connection.write(data) while data = body.read(16384)
+ end
+ end
rescue => e
# TODO(sissel): Rescue specific exceptions, not just anything.
# Reconnect and retry
if tries > 0
connection.connect