Set close header when closing HTTP/1.1 connections

Fixes #1958