#2393·aria2

No fallback when resuming a download if server does not respect the range header

Author: v1993Created Aug 24, 2026Updated Aug 24, 2026

The server at https://repo.secureblue.dev does not respect range headers, always serving the entire file. Aria2c handles this gracefully when downloading the entire file with multiple (4 here) connections:

08/24 14:27:34 [NOTICE] Downloading 1 item(s)
[#f30e6e 432KiB/123MiB(0%) CN:4 DL:1.1MiB ETA:1m50s]                                                                                                                                        
08/24 14:27:38 [ERROR] CUID#12 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 65011712-97517567/129554618, Response: 0-129554617/129554618

08/24 14:27:38 [ERROR] CUID#14 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 97517568-129554617/129554618, Response: 0-129554617/129554618

08/24 14:27:38 [ERROR] CUID#13 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 32505856-65011711/129554618, Response: 0-129554617/129554618
[#f30e6e 113MiB/123MiB(92%) CN:1 DL:9.9MiB]                                                                                                                                                 
08/24 14:27:51 [NOTICE] Download complete: ...

Evidently, the one connection that requested range from the beginning of the file completes the download by itself.

However, if download is interrupted at some point and then resumed, aria2c will fail to resume the download:

08/24 14:26:47 [NOTICE] Downloading 1 item(s)
[#776a39 16KiB/123MiB(0%) CN:4 DL:0B]                                                                                                                                                       
08/24 14:26:52 [ERROR] CUID#11 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 16384-32505855/129554618, Response: 0-129554617/129554618

08/24 14:26:52 [ERROR] CUID#13 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 32505856-65011711/129554618, Response: 0-129554617/129554618

08/24 14:26:52 [ERROR] CUID#14 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 97517568-129554617/129554618, Response: 0-129554617/129554618

08/24 14:26:52 [ERROR] CUID#12 - Download aborted. URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
Exception: [AbstractCommand.cc:351] errorCode=8 URI=https://repo.secureblue.dev/Packages/trivalent-151.0.7922.173-446835.x86_64.rpm
  -> [HttpResponse.cc:81] errorCode=8 Invalid range header. Request: 65011712-97517567/129554618, Response: 0-129554617/129554618

08/24 14:26:52 [NOTICE] Download GID#776a39e45e16e796 not complete: ...

There should be a fallback in this scenario to request the entire file from the beginning.