HTTP Range support missing, cannot resume file download

Discourse is missing support for HTTP Range header and always replies with 200 OK code instead of 206 Partial Content for the file downloads. This is inconvenient for the forum users as it forces to redownload the whole file in case of unstable internet connection.

The topic Backup too big, is there a way to download it through "resume download" mentioned this issue in case of backup download, however this also applies to regular file download when S3 storage is not used.

I checked nginx proxy configuration, and it’s not a configuration issue. Range header is properly passed to localhost:3000 for /uploads/short-url/ requests, but Discourse does not handle it.

As HTTP Range is one of the basic HTTP features, filling it under “bug”, not “feature” category.

P.S. it is not reproducible here, on, as it uses S3 for storage.


That is handled here:

Adding support for ranges is definitely possible, but would involve using send_data, and reading the file from disk and sending the range:

A bit too messy to be honest.

1 Like