Avoid writing a "Transfer-Encoding" client request header when no body was written. Fixes #856.