v0.4.37: percent-encode preload download URL so non-ASCII paths cache
All checks were successful
build / build (push) Successful in 8m8s

VideoCache.download() opened the connection with URI.create(url).toURL()
on the raw URL. URLs whose path has non-ASCII segments (e.g. the Korean
".../음악퀴즈/...") were sent unencoded, so the server answered HTTP 400 and
every preload aborted — the disk cache stayed empty and clients fell back
to live streaming for every video (instant on a fast host, 10s+/no-show on
a slower remote client). FFmpeg tolerates the raw URL, masking the bug at
playback time. Encode only the bytes put on the wire; the READY key, sha256
filename, and lookup() all keep the original url string so cache hits still
match the anchor's raw URL. Verified: raw URL -> HTTP 400, encoded -> 200.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
tkrmagid
2026-06-14 02:17:07 +09:00
parent 305d3429c8
commit e1205c294b
2 changed files with 27 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ org.gradle.configuration-cache=false
# Mod
mod_id=video_player
mod_version=0.4.36
mod_version=0.4.37
maven_group=com.ejclaw.videoplayer
archives_base_name=video_player