Skip to content

Commit eb5fa72

Browse files
committed
Ignore bad requests.
1 parent 6b72bde commit eb5fa72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/async/http/server.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def accept(peer, address, task: Task.current)
5656
# If this returns nil, we assume that the connection has been hijacked.
5757
self.call(request)
5858
end
59+
rescue Protocol::HTTP::BadRequest
60+
# Ignore bad requests, just close the connection.
5961
ensure
6062
connection&.close
6163
end

0 commit comments

Comments
 (0)