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

only send 408 if in the data phase.

This commit is contained in:
Philip Wiebe 2014-01-30 17:37:38 -05:00
parent ace195c9d4
commit 32300e81b4
2 changed files with 6 additions and 1 deletions

View file

@ -59,6 +59,10 @@ module Puma
env[HIJACK_IO] ||= @io
end
def in_data_phase
!@read_header
end
def set_timeout(val)
@timeout_at = Time.now + val
end
@ -100,6 +104,7 @@ module Puma
EmptyBody = NullIO.new
def setup_body
@in_data_phase = true
body = @parser.body
cl = @env[CONTENT_LENGTH]

View file

@ -98,7 +98,7 @@ module Puma
while @timeouts.first.timeout_at < now
c = @timeouts.shift
c.write_408
c.write_408 if c.in_data_phase
c.close
sockets.delete c