mirror of
https://github.com/rclone/rclone.git
synced 2026-10-28 14:28:38 -04:00
PikPak's download node sometimes answers a ranged GET with 502 Bad Gateway and a short HTML body. client.Do treats any completed response as success, and shouldRetry returns immediately when err is nil, so that HTML was saved as the file and rclone exited 0. With the VFS cache those bytes were then served again. Non-2xx download responses are now converted with the backend error handler, which closes the body. Statuses in retryErrorCodes (429 and 5xx, including 502) are retried by the pacer. Any other status is returned as an error. Successful 200 and 206 responses are unchanged.