Repository navigation
Conversation
stream_episode served local files via tower_http ServeFile but built the inner request with no headers, so the client Range header was dropped and every response was 200 + full body. iOS AVPlayer re-fetched from byte 0 on each buffer refill, making YouTube playback restart every ~60s. Forward Range/If-Range/If-Modified-Since/If-None-Match/If-Unmodified-Since into the ServeFile request so it can answer 206 Partial Content.
ashtonian
marked this pull request as ready for review
October 18, 2026 02:10
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on @honzup's #986 to restore resume and seeking for episodes downloaded on the PinePods server (#980). #986 forwards
Rangeand conditional headers toServeFileso the player can request part of a file. Its original commit is preserved; credit to @davegallant for the original diagnosis.Adds on top of #986:
If-Rangevalidation that header forwarding alone does not provide with the currentServeFileversion. A matching strong ETag or last-modified date permits a partial response; a stale or weak validator returns the full file instead, preventing old and new file contents from being combined.HEADas a metadata-only request.RangeandIf-Rangeare ignored forHEAD, including out-of-bounds ranges, so it returns full-file metadata without an audio body.If-Matchand tests that cache/precondition responses take precedence over range delivery.HEAD, and cache conditions.Validation: all 21 Rust API tests pass on this branch, including the seven streaming regressions. Physical iOS resume/seek testing remains pending; GitHub Actions await maintainer approval. No runtime dependency is added.
This PR contains #986 plus these additions and targets
main. If #986 lands separately first, sync this branch before merging.Related: #980. Protocol reference: RFC 9110 section 14.2. Replaces the closed fork follow-up.