summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2021-12-23 18:10:04 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2021-12-23 18:10:04 +0100
commitb7f08143b5ed9f88f683220b75cbf6b144a1a986 (patch)
treead3a56afc8746845e295f1481f0b5c63510b803d
parentddf053ffd56100c4d25b304a55047934947154eb (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.
-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;
}