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

Deal with zero sized bodies properly when using SSL. Fixes #1483

This commit is contained in:
Evan Phoenix 2018-03-05 21:26:04 -08:00
parent b9ff900eee
commit 61c875f0de
2 changed files with 3 additions and 1 deletions

View file

@ -81,6 +81,8 @@ module Puma
end
def write(data)
return 0 if data.empty?
need = data.bytesize
while true

View file

@ -755,8 +755,8 @@ module Puma
begin
res_body.each do |part|
next if part.bytesize.zero?
if chunked
next if part.bytesize.zero?
fast_write client, part.bytesize.to_s(16)
fast_write client, line_ending
fast_write client, part