skip runtime chunk split if --redirect is not set

master
tiptorrent development team 2021-09-24 10:37:22 +02:00
parent 2f120d9cd2
commit 8e939e3905
1 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,9 @@ int tip_client_state_process_payload(struct tip_client *cli)
switch (cli->method) {
case TIP_METHOD_GET:
case TIP_METHOD_POST:
if (!redirect)
break;
/* get chunk number from file extension, e.g. FILE.0 */
chunk = strchr(uri, '.');
if (chunk) {
@ -188,6 +191,9 @@ int tip_client_state_process_payload_reply(struct tip_client *cli)
switch (cli->method) {
case TIP_METHOD_GET:
if (!redirect)
break;
if (cli->chunk < 0)
break;