Skip to content

Commit

Permalink
Update curl.c
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 authored Jan 11, 2022
1 parent c5554d9 commit b6a10a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,9 +1230,9 @@ void CurlTransfer( _In_ PCURL_REQUEST pReq )
curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, (PLONG)&pReq->Error.iHttp ); /// ...might not be available
szError[0] = 0;

if (pReq->Error.iHttp == 416) { // HTTP 416: "Requested Range Not Satisfiable"
if (pReq->Runtime.iResumeFrom <= pReq->Runtime.iRangeEnd)
pReq->Error.iHttp = 200; // Nothing needs to download
// HTTP 416: "Requested Range Not Satisfiable", check does the range is properly
if (pReq->Error.iHttp == 416 && pReq->Runtime.iResumeFrom <= pReq->Runtime.iRangeEnd) {
pReq->Error.iHttp = 206; // Set response code same with iResumeFrom < iRangeEnd
}

// Finished?
Expand Down

0 comments on commit b6a10a8

Please sign in to comment.