summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-12-23 18:10:04 +0100
committertiptorrent development team <tiptorrent@soleta.eu>2021-12-23 18:27:37 +0100
commite15e2364f71e3a657f873c1fc4adc3e2411ec340 (patch)
treead3a56afc8746845e295f1481f0b5c63510b803d /src/main.c
parent6e55df90e4881f2aee2c2748fa3e49fa21c156a5 (diff)
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.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 0 insertions, 3 deletions
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;
}