From 8e939e3905733abfd461fa3e59d14b6286667129 Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Fri, 24 Sep 2021 10:37:22 +0200 Subject: skip runtime chunk split if --redirect is not set --- src/handler.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3-18-g5258