summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-24 10:37:22 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:49:17 +0200
commit8e939e3905733abfd461fa3e59d14b6286667129 (patch)
tree8f3a325872ea08f1ae4c1a865706578e596b6aff /src
parent2f120d9cd272ba76f53ca1d0b31aac680934b688 (diff)
skip runtime chunk split if --redirect is not set
Diffstat (limited to 'src')
-rw-r--r--src/handler.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/handler.c b/src/handler.c
index 1c107dd..3f15e4f 100644
--- a/src/handler.c
+++ b/src/handler.c
@@ -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;