premature close / read on closed connection

fix the premature close when server sends a Connection: close header and no body cc @mynameisfiber