lib/ftw/http/message.rb in ftw-0.0.26 vs lib/ftw/http/message.rb in ftw-0.0.27
- old
+ new
@@ -60,10 +60,10 @@
return if headers.include?("Content-Length") or headers.include?("Transfer-Encoding")
if (message_body.respond_to?(:read) or message_body.respond_to?(:each)) and
headers["Transfer-Encoding"] = "chunked"
else
- headers["Content-Length"] = message_body.length
+ headers["Content-Length"] = message_body.bytesize
end
end # def body=
# Get the body of this message
#