added support for honouring server-side "Connection: close" headers