You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cache resolved redirect URL for subsequent HTTP range requests #12
It would be useful if AetherEngine remembered the final URL after an HTTP redirect during a media load and reused that resolved URL for later range requests, seeks, reconnects, or pipeline rebuilds.
For debrid/proxy playback URLs, the app often starts with a stable-looking playback endpoint that redirects to a CDN/object-storage URL. If every new HTTP request starts again from the original playback URL, playback can pay an extra proxy request and redirect hop repeatedly.
Proposed Behavior
When opening an HTTP(S) media URL:
Start with the caller-provided source URL.
If the request redirects, keep the final resolved URL in memory for that media load.
Use the resolved URL for subsequent range requests, reconnects, and seeks.
If the resolved URL fails with an expiry-like status such as 401, 403, 404, 410, or a CDN-specific auth error, fall back to the original source URL and allow it to redirect again.
Safety / Correctness Notes
Keep the original URL as the canonical fallback because signed CDN URLs can expire.
Preserve Range and Accept-Encoding: identity behavior across redirects.
Consider exposing this as internal transport behavior rather than a public API requirement.
Expected Benefit
This should reduce startup/seek/reconnect latency for redirected playback URLs and avoid repeated debrid/proxy hops while keeping the original source URL available when the resolved target expires.
Implemented in 601205e. After the first probe / chunk fetch completes with a 2xx/206, AVIOReader captures dataTask.currentRequest?.url (the post-redirect URL) and reuses it for every subsequent Range request. Cache is per playback session (one AVIOReader per Demuxer).
Safety rails:
Cache only populates on success, so 4xx redirect targets can't poison it.
401 / 403 / 404 / 410 against the cached URL drop the cache and trigger a one-shot retry against the original source URL so the proxy can re-issue a fresh signed redirect. fetchChunk wraps the request in a two-pass helper that handles the fallback.
Range and the caller-supplied extra headers are re-applied on cross-host redirects in ChunkFetchDelegate (the probe path already did this).
Scope: seekable mode only. Streaming mode is a single GET, so caching doesn't help there.
Engine pin bumped on Sodalite main. Once a release goes out, debrid playback should see fewer proxy hops on seek and reconnect. Please ping if you notice the fallback firing more than expected (each invalidation prints [AVIOReader] Dropped resolved URL cache (expiry status) in DEBUG builds).
Activity
superuser404notfound commentedon May 23, 2026
Implemented in
601205e. After the first probe / chunk fetch completes with a 2xx/206,AVIOReadercapturesdataTask.currentRequest?.url(the post-redirect URL) and reuses it for every subsequent Range request. Cache is per playback session (oneAVIOReaderperDemuxer).Safety rails:
fetchChunkwraps the request in a two-pass helper that handles the fallback.Rangeand the caller-supplied extra headers are re-applied on cross-host redirects inChunkFetchDelegate(the probe path already did this).Scope: seekable mode only. Streaming mode is a single GET, so caching doesn't help there.
Engine pin bumped on Sodalite
main. Once a release goes out, debrid playback should see fewer proxy hops on seek and reconnect. Please ping if you notice the fallback firing more than expected (each invalidation prints[AVIOReader] Dropped resolved URL cache (expiry status)in DEBUG builds).feat(network): cache resolved CDN URL across range / probe fetches
fix(avio): bound reconnects for error-ended zero-byte connections
fix(prewarm): a warm hands over its resolved target, its Matroska tai…