fix content-length when body is re-assigned. Closes #267