Handled cases when connection returns incorrect content length value.