diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-27 11:27:30 +0200 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-29 15:49:21 +0200 |
commit | 6010fe62fda49ffb6a3fa7038b0c2feb61767263 (patch) | |
tree | 6551b45191468e49585d4efdb8b623bf9748db19 /src/handler.c | |
parent | 6a81079dc1a9d4deea7d8faa787baed2ffe80556 (diff) |
download checksum file directly from server
Remove assumption on small file to shortcircuit the redirect logic.
Diffstat (limited to 'src/handler.c')
-rw-r--r-- | src/handler.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/handler.c b/src/handler.c index 3f15e4f..97f54b5 100644 --- a/src/handler.c +++ b/src/handler.c @@ -106,6 +106,12 @@ int tip_client_state_process_payload(struct tip_client *cli) if (!redirect) break; + /* skip checksum files. */ + if (strstr(uri, ".full.sum")) { + cli->checksum = true; + break; + } + /* get chunk number from file extension, e.g. FILE.0 */ chunk = strchr(uri, '.'); if (chunk) { @@ -150,7 +156,7 @@ int tip_client_state_process_payload(struct tip_client *cli) return 0; } - if (tip_client_large_file(cli)) { + if (!tip_client_checksum_file(cli)) { cli->allow_redirect = allow_redirect; num_clients++; |