Loading
fix(updater): handle HTTP redirects manually for KOReader compatibility
KOReader's LuaSocket doesn't support the 'redirect=true' parameter, which caused the auto-updater to fail with 'redirect not supported' error. Changes: - Implement manual redirect following in _makeHttpRequest() - Follow Location header for 3xx status codes (up to 5 redirects) - Handle both absolute and relative redirect URLs - Update downloadUpdate() to use HEAD request for redirect resolution - Follow redirects before actual file download - Add max_redirects parameter with default of 5 - Return response headers from _makeHttpRequest() This fixes the error: ERROR BookloreSync Updater: HTTP request failed: redirect not supported Testing: - Lua syntax check passed - Compatible with KOReader's socket.http and ssl.https libraries - Follows GitHub API redirects properly