From 10aa29fa2c8fc4fdff8554eab24be07e6885aa50 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 27 Apr 2016 00:27:02 +0000 Subject: proxy_http_response: cleanup: avoid redundant setting of "alive" We already check for the truthiness of "alive" in the "if" statement, so re-setting is pointless. --- lib/yahns/proxy_http_response.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/yahns/proxy_http_response.rb b/lib/yahns/proxy_http_response.rb index c8a2a42..e551323 100644 --- a/lib/yahns/proxy_http_response.rb +++ b/lib/yahns/proxy_http_response.rb @@ -101,7 +101,6 @@ module Yahns::HttpResponse # :nodoc: # but the backend does not terminate properly if alive && ! term && (env['HTTP_VERSION'] == 'HTTP/1.1'.freeze) res << "Transfer-Encoding: chunked\r\n".freeze - alive = true end res << (alive ? "Connection: keep-alive\r\n\r\n".freeze : "Connection: close\r\n\r\n".freeze) -- cgit v1.2.3-24-ge0c7