Skip to content
Permalink
Browse files Browse the repository at this point in the history
Better handle client input
  • Loading branch information
evanphx committed May 18, 2020
1 parent 7a65937 commit f24d552
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/puma/client.rb
Expand Up @@ -285,8 +285,16 @@ def setup_body

te = @env[TRANSFER_ENCODING2]

if te && CHUNKED.casecmp(te) == 0
return setup_chunked_body(body)
if te
if te.include?(",")
te.split(",").each do |part|
if CHUNKED.casecmp(part.strip) == 0
return setup_chunked_body(body)
end
end
elsif CHUNKED.casecmp(te) == 0
return setup_chunked_body(body)
end
end

@chunked_body = false
Expand Down

0 comments on commit f24d552

Please sign in to comment.