mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-18 07:30:29 +00:00
5686c352c changed the estimate from bitRate / 8 * 1024 to * 1000, reading the 1024 as a unit mistake. It was headroom: the body also carries the ID3 tag, the Xing frame and frame padding, so a nominal-size estimate is short, and net/http aborts a response that writes past its declared Content-Length. Measured on a live server, a 429s track at 64kbps was estimated at 3,439,840 bytes against a 3,441,569-byte body, and the stream was cut with 'http: wrote more than the declared Content-Length'. Restores the 1024, says why next to it, and turns the test into one that asserts the headroom rather than a formula.