416 Range Not Satisfiable means the byte range the client requested via the Range header lies outside the actual size of the resource. Asking for bytes at the 100 MB mark of a 5 MB file triggers it.
It commonly appears in resumable downloads or media streaming when the client has a stale idea of the file size. The server responds with Content-Range: bytes */<total> so the client learns the real size.
GET /video.mp4 HTTP/1.1
Host: cdn.example.com
Range: bytes=99999999-100000000HTTP/1.1 416 Range Not Satisfiable
Content-Range: bytes */5242880
Content-Type: text/plain
Requested range not satisfiableconst size = fs.statSync(file).size;
const m = /bytes=(\d+)-(\d*)/.exec(req.headers.range || '');
const start = m ? Number(m[1]) : 0;
if (start >= size) {
res.writeHead(416, { 'Content-Range': `bytes */${size}` });
return res.end();
}# Ask for the first 1024 bytes; a valid range yields 206, an out-of-bounds one 416
curl -r 0-1023 https://cdn.example.com/video.mp4 -o chunk.bin