From e15e2364f71e3a657f873c1fc4adc3e2411ec340 Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Thu, 23 Dec 2021 18:10:04 +0100 Subject: fix download of very small files If the first recv() call fully gets the HTTP header and the file chunk, then tip_client_get_hdr() returns 1 to enter the TIP_CLIENT_DONE state to finish. --- src/main.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index fabf4f4..5e0d396 100644 --- a/src/main.c +++ b/src/main.c @@ -212,9 +212,6 @@ static int tip_client_get_hdr(struct tip_client *cli) } } - if (payload_len >= cli->content_len) - return 0; - return 1; } -- cgit v1.2.3-18-g5258