Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wget stops retrying to download a file when hitting fatal http errors like 503. But if a previous try had resulted in a partially downloaded ${file}, the next wget call tries to download to ${file}.1. Example: +wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz --2020-03-18 20:51:42-- https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.1.176, 151.101.65.176, 151.101.129.176, ... Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 103076276 (98M) [application/x-xz] Saving to: ‘linux-4.16.18.tar.xz’ linux-4.16.18.tar.x 0%[ ] 13.07K --.-KB/s in 0s 2020-03-18 20:54:44 (133 MB/s) - Read error at byte 13383/103076276 (Connection reset by peer). Retrying. --2020-03-18 20:54:45-- (try: 2) https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected. HTTP request sent, awaiting response... 503 first byte timeout 2020-03-18 20:55:46 ERROR 503: first byte timeout. +wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz --2020-03-18 20:55:46-- https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.16.18.tar.xz Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.1.176, 151.101.65.176, 151.101.129.176, ... Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.1.176|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 103076276 (98M) [application/x-xz] Saving to: ‘linux-4.16.18.tar.xz.1’ linux-4.16.18.tar.x 100%[===================>] 98.30M 186MB/s in 0.5s 2020-03-18 20:55:56 (186 MB/s) - ‘linux-4.16.18.tar.xz.1’ saved [103076276/103076276] Fixes: 048674b ("travis: Retry kernel download on 503 first byte timeout.") Signed-off-by: David Marchand <[email protected]> Acked-by: Kevin Traynor <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
- Loading branch information