lib/async/http/protocol/http10.rb in async-http-0.23.3 vs lib/async/http/protocol/http10.rb in async-http-0.24.0
- old
+ new
@@ -32,10 +32,14 @@
def version
VERSION
end
def persistent?(headers)
- headers.delete(CONNECTION) == KEEP_ALIVE
+ if connection = headers[CONNECTION]
+ return connection.include?(KEEP_ALIVE)
+ else
+ return false
+ end
end
# Server loop.
def receive_requests(task: Task.current)
while @persistent