mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
Review of the direct cover read found two regressions. - downloadCover parsed Content-Type with ContentType.parse, which throws on a malformed value such as an unterminated quote. The response was then never read or discarded, so it held one of the server's six pooled connections for good, the same pool audio playback uses. The mime type is now read without throwing, and any response whose body was not read is discarded, in downloadCover and in _serve. The opener also discards when its own header checks throw (the Subsonic contentType getter had the same hold before this unit). - An SMB range that cannot be satisfied answered with an empty chunked body instead of the old Content-Length: 0. The 416 answer sets the length again. A cover answer that will not change soon (404 or 410, a Subsonic error document with either status, audio or video, too large, empty) now throws NetworkMediaUnavailable, an HttpException, so callers can wait longer before asking again. Declared audio and video types are refused before any bytes are read. A pinned TLS server is covered by a direct read test too.