http.c: use CURLOPT_RANGE for range requests