1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Make sure to use bytesize instead of size when writing data in the

MiniSSL's write.

@engine.write reports bytes written, not characters written.
This commit is contained in:
Ward Vandewege 2013-05-06 14:32:03 -04:00
parent ac8a9fb49e
commit eac3cc7f82

View file

@ -46,7 +46,7 @@ module Puma
end
def write(data)
need = data.size
need = data.bytesize
while true
wrote = @engine.write data
@ -58,7 +58,7 @@ module Puma
need -= wrote
return data.size if need == 0
return data.bytesize if need == 0
data = data[need..-1]
end