fixing bad behaviour around zero content-length