fix segv: content_length overwritten bug