Skip to content

Commit f24d552

Browse files
committed
Better handle client input
1 parent 7a65937 commit f24d552

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: lib/puma/client.rb

+10-2
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,16 @@ def setup_body
285285

286286
te = @env[TRANSFER_ENCODING2]
287287

288-
if te && CHUNKED.casecmp(te) == 0
289-
return setup_chunked_body(body)
288+
if te
289+
if te.include?(",")
290+
te.split(",").each do |part|
291+
if CHUNKED.casecmp(part.strip) == 0
292+
return setup_chunked_body(body)
293+
end
294+
end
295+
elsif CHUNKED.casecmp(te) == 0
296+
return setup_chunked_body(body)
297+
end
290298
end
291299

292300
@chunked_body = false

0 commit comments

Comments
 (0)