properly half-close both sides of the HTTP connection