Skip to content

debusine.web doesn't support byte-range requests without both start and end positions

After the setup in #955, adding Languages: none to test.sources as a workaround for that issue and running a follow-up apt update fails:

$ APT_CONFIG=td/etc/apt/apt.conf apt update
Err:1 https://deb.debusine.debian.net/debian/base trixie InRelease
  400  Bad Request [IP: 2a01:4f8:c0c:198f::1 443]
Error: Failed to fetch https://deb.debusine.debian.net/debian/base/dists/trixie/InRelease  400  Bad Request [IP: 2a01:4f8:c0c:198f::1 443]
Error: The repository 'https://deb.debusine.debian.net/debian/base trixie InRelease' is not signed.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.

strace indicates that it's getting an application/problem+json response with the content {"title": "Invalid Range header: \"bytes=165676-\""}. This seems to be because debusine.web.views.files.FileDownloadMixin and debusine.utils.parse_range_header support byte-ranges that have both a start and end position, but not ones that only have one of those. RFC 7233 section 2.1 indicates that such byte-ranges are valid.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information