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:
parent
ace195c9d4
commit
32300e81b4
2 changed files with 6 additions and 1 deletions
|
@ -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]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue