diff --git a/async-http.gemspec b/async-http.gemspec index ec72274..74b150e 100644 --- a/async-http.gemspec +++ b/async-http.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_dependency "io-endpoint", "~> 0.11" spec.add_dependency "io-stream", "~> 0.4" spec.add_dependency "protocol-http", "~> 0.28" - spec.add_dependency "protocol-http1", "~> 0.19" + spec.add_dependency "protocol-http1", "~> 0.20" spec.add_dependency "protocol-http2", "~> 0.18" spec.add_dependency "traces", ">= 0.10" end diff --git a/lib/async/http/protocol/http1/server.rb b/lib/async/http/protocol/http1/server.rb index 24ed951..b7acbcf 100644 --- a/lib/async/http/protocol/http1/server.rb +++ b/lib/async/http/protocol/http1/server.rb @@ -35,13 +35,9 @@ def next_request end return request - rescue Async::TimeoutError, IO::TimeoutError - # For an interesting discussion about this behaviour, see https://trac.nginx.org/nginx/ticket/1005 - # If you enable this, you will see some spec failures... - # fail_request(408) - raise - rescue + rescue ::Protocol::HTTP1::BadRequest fail_request(400) + # Conceivably we could retry here, but we don't really know how bad the error is, so it's better to just fail: raise end