dynamically set new content-length