Recalculate content-length based on modified html.