Fixed: do not send Range request header when encounter error.
Merge pull request #2675 from ulion/curl_range_rework

Fixed: do not send Range request header when encounter error.