Fix bugs with etcd protocol and chunked encoding.