In finish_http_response(), set 'Connection: close' after preventing pipelining