Retry downloads if a server doesn't support byte ranges
Retry downloads if a server doesn't support byte ranges

If an incomplete download exists, and the HTTP server doesn't support
byte ranges, delete the incomplete download and retry once.

Tested with freeling, whose server does not support byte ranges.

Closes Homebrew/homebrew#19757.

Homebrew/brew,gordonmcshane/homebrew,reelsense/brew,tonyg/homebrew,staticfloat/brew,vitorgalvao/brew,claui/brew,zmwangx/brew,nandub/brew,mahori/brew,AnastasiaSulyagina/brew,konqui/brew,nandub/brew,gordonmcshane/homebrew,pseudocody/brew,bfontaine/brew,claui/brew,rwhogg/brew,rwhogg/brew,amar-laksh/brew_sudo,reelsense/brew,EricFromCanada/brew,Homebrew/brew,DomT4/brew,pseudocody/brew,MikeMcQuaid/brew,mahori/brew,alyssais/brew,hanxue/linuxbrew,DomT4/brew,EricFromCanada/brew,aw1621107/brew,aw1621107/brew,mahori/brew,muellermartin/dist,DomT4/brew,Linuxbrew/brew,EricFromCanada/brew,Homebrew/brew,alyssais/brew,jmsundar/brew,amar-laksh/brew_sudo,jmsundar/brew,sjackman/homebrew,toonetown/homebrew,mistydemeo/homebrew,konqui/brew,nandub/brew,mahori/brew,palxex/brew,reitermarkus/brew,gregory-nisbet/brew,tonyg/homebrew,ilovezfs/brew,JCount/brew,muellermartin/dist,palxex/brew,mgrimes/brew,MikeMcQuaid/brew,MikeMcQuaid/brew,palxex/brew,zmwangx/brew,maxim-belkin/brew,amar-laksh/brew_sudo,gregory-nisbet/brew,bfontaine/brew,zmwangx/brew,AnastasiaSulyagina/brew,JCount/brew,ilovezfs/brew,claui/brew,Homebrew/brew,AnastasiaSulyagina/brew,JCount/brew,mistydemeo/homebrew,DomT4/brew,konqui/brew,sjackman/homebrew,nandub/brew,Linuxbrew/brew,vitorgalvao/brew,mistydemeo/homebrew,EricFromCanada/brew,mgrimes/brew,konqui/brew,hanxue/linuxbrew,sjackman/homebrew,toonetown/homebrew,gregory-nisbet/brew,reitermarkus/brew,hanxue/linuxbrew,ilovezfs/brew,rwhogg/brew,pseudocody/brew,staticfloat/brew,toonetown/homebrew,vitorgalvao/brew,mgrimes/brew,muellermartin/dist,Linuxbrew/brew,reitermarkus/brew,bfontaine/brew,reelsense/brew,maxim-belkin/brew,Linuxbrew/brew,jmsundar/brew,tonyg/homebrew,maxim-belkin/brew,gordonmcshane/homebrew,claui/brew,staticfloat/brew,sjackman/homebrew,vitorgalvao/brew,aw1621107/brew,alyssais/brew,reitermarkus/brew,MikeMcQuaid/brew,JCount/brew