Better parsing of content length at the right moment. Avoids the possibility of cancelling when pausing.