Follow-up Comment #1, bug #62869 (project wget): Oh, I forgot to mention one important thing: this issue only happens with *-O file* arg (aka *--output-document=file* ), and doesn't happen with *--continue*
Here's output of ./go bug --debug when bug is present: $ ./go bug --debug Bugged version on /tmp ~/sandbox/python/server_for_wget Setting --tries (tries) to 3 Setting --timeout (timeout) to 2 Setting --passive-ftp (passiveftp) to 1 Setting --output-document (outputdocument) to aha.txt DEBUG output created by Wget 1.21.3 on linux-gnu. Reading HSTS entries from /home/user/.wget-hsts --2022-08-06 08:28:19-- http://127.0.2.9:8000/a.txt Connecting to 127.0.2.9:8000... connected. Created socket 4. Releasing 0x00005e5530cfbea0 (new refcount 0). Deleting unused 0x00005e5530cfbea0. ---request begin--- GET /a.txt HTTP/1.1 Host: 127.0.2.9:8000 User-Agent: Wget/1.21.3 Accept: */* Accept-Encoding: identity Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... 127.0.0.1 - - [06/Aug/2022 08:28:19] "GET /a.txt HTTP/1.1" 302 - ---response begin--- HTTP/1.0 302 Found Server: BaseHTTP/0.6 Python/3.10.6 Date: Sat, 06 Aug 2022 06:28:19 GMT Location: http://127.0.3.12:8001/a.txt ---response end--- 302 Found Registered socket 4 for persistent reuse. Location: http://127.0.3.12:8001/a.txt [following] ] done. --2022-08-06 08:28:19-- http://127.0.3.12:8001/a.txt Connecting to 127.0.3.12:8001... connected. Created socket 5. Releasing 0x00005e5530cfc350 (new refcount 0). Deleting unused 0x00005e5530cfc350. ---request begin--- GET /a.txt HTTP/1.1 Host: 127.0.3.12:8001 User-Agent: Wget/1.21.3 Accept: */* Accept-Encoding: identity Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... 127.0.0.1 - - [06/Aug/2022 08:28:19] "GET /a.txt HTTP/1.1" 200 - [Server] Sending full file Pretending to timeout ---response begin--- HTTP/1.0 200 OK Server: BaseHTTP/0.6 Python/3.10.6 Date: Sat, 06 Aug 2022 06:28:19 GMT Content-type: text/plain; charset=utf-8 Content-Length: 14 ---response end--- 200 OK Disabling further reuse of socket 4. Closed fd 4 Registered socket 5 for persistent reuse. Length: 14 [text/plain] Saving to: 'aha.txt' aha.txt 42%[=================================> ] 6 --.-KB/s in 2.0s Disabling further reuse of socket 5. Closed fd 5 2022-08-06 08:28:21 (3.00 B/s) - Read error at byte 6/14 (Connection timed out). Retrying. --2022-08-06 08:28:22-- (try: 2) http://127.0.3.12:8001/a.txt Connecting to 127.0.3.12:8001... connected. Created socket 4. Releasing 0x00005e5530cfc8d0 (new refcount 0). Deleting unused 0x00005e5530cfc8d0. ---request begin--- GET /a.txt HTTP/1.1 Host: 127.0.3.12:8001 Range: bytes=6- User-Agent: Wget/1.21.3 Accept: */* Accept-Encoding: identity Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... 127.0.0.1 - - [06/Aug/2022 08:28:22] "GET /a.txt HTTP/1.1" 302 - ---response begin--- HTTP/1.0 302 Found Server: BaseHTTP/0.6 Python/3.10.6 Date: Sat, 06 Aug 2022 06:28:22 GMT Location: http://127.0.2.9:8000/a.txt ---response end--- 302 Found Registered socket 4 for persistent reuse. Location: http://127.0.2.9:8000/a.txt [following] ] done. --2022-08-06 08:28:22-- http://127.0.2.9:8000/a.txt Connecting to 127.0.2.9:8000... connected. Created socket 5. Releasing 0x00005e5530cfca50 (new refcount 0). Deleting unused 0x00005e5530cfca50. ---request begin--- GET /a.txt HTTP/1.1 Host: 127.0.2.9:8000 User-Agent: Wget/1.21.3 Accept: */* Accept-Encoding: identity Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... 127.0.0.1 - - [06/Aug/2022 08:28:22] "GET /a.txt HTTP/1.1" 200 - [Server] Sending full file ---response begin--- HTTP/1.0 200 OK Server: BaseHTTP/0.6 Python/3.10.6 Date: Sat, 06 Aug 2022 06:28:22 GMT Content-type: text/plain; charset=utf-8 Content-Length: 14 ---response end--- 200 OK Disabling further reuse of socket 4. Closed fd 4 Registered socket 5 for persistent reuse. Length: 14 [text/plain] Saving to: 'aha.txt' aha.txt 100%[================================================================================>] 14 --.-KB/s in 0s 2022-08-06 08:28:22 (3.34 MB/s) - 'aha.txt' saved [14/14] Hello Hello World. -rw-r--r-- 1 user user 20 Aug 6 08:28 aha.txt Bug still present! _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?62869> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
