Summary
GET /api/haste/GetModelArtifact ignores the HTTP Range request header and returns 200 OK with the full body instead of 206 Partial Content. A client that issues a range request and treats the response as the requested byte range ends up with a corrupted assembly, and the browser caches the bad result.
Impact
The Interactive Labeler's sidecar for a ~112k-building layer is roughly 440 MB. When a range request is served as a 200, the cached artifact is poisoned and the labeler subsequently fails to initialise:
Error initializing interactive labeler
The failure persists until the browser cache is cleared, and the error message gives no hint that a cached artifact is the cause. We hit this intermittently alongside transient 5xx responses during the same large download.
Related defect on the same endpoint
HEAD on GetModelArtifact returns 404 while GET on the identical URL succeeds. That prevents clients from cheaply probing size or existence before committing to a large download.
Suggested fix
- Honour
Range and return 206 with a correct Content-Range header, or explicitly advertise Accept-Ranges: none so clients don't attempt partial fetches.
- Make
HEAD mirror GET status and headers.
Summary
GET /api/haste/GetModelArtifactignores the HTTPRangerequest header and returns 200 OK with the full body instead of 206 Partial Content. A client that issues a range request and treats the response as the requested byte range ends up with a corrupted assembly, and the browser caches the bad result.Impact
The Interactive Labeler's sidecar for a ~112k-building layer is roughly 440 MB. When a range request is served as a 200, the cached artifact is poisoned and the labeler subsequently fails to initialise:
The failure persists until the browser cache is cleared, and the error message gives no hint that a cached artifact is the cause. We hit this intermittently alongside transient 5xx responses during the same large download.
Related defect on the same endpoint
HEADonGetModelArtifactreturns 404 whileGETon the identical URL succeeds. That prevents clients from cheaply probing size or existence before committing to a large download.Suggested fix
Rangeand return206with a correctContent-Rangeheader, or explicitly advertiseAccept-Ranges: noneso clients don't attempt partial fetches.HEADmirrorGETstatus and headers.