summaryrefslogtreecommitdiffstats
path: root/src/handler.c
Commit message (Collapse)AuthorAgeFilesLines
* prioritize redirections over direct server downloadtiptorrent development team2021-09-291-2/+2
| | | | testbed shows 95% use of redirections for data transfers.
* use strrchr to take last dot that specifies the chunk numbertiptorrent development team2021-09-291-1/+1
| | | | | file might have a extension starting by dot, use strrchr to get the last dot that specifies the chunk number
* download checksum file directly from servertiptorrent development team2021-09-291-1/+7
| | | | Remove assumption on small file to shortcircuit the redirect logic.
* skip runtime chunk split if --redirect is not settiptorrent development team2021-09-291-0/+6
|
* fix chunk size split logictiptorrent development team2021-09-291-11/+7
| | | | Add remainder bytes to the last chunk instead.
* add basic uri sanitizationtiptorrent development team2021-09-291-1/+4
| | | | disallow .. in uri.
* runtime split original file into chunkstiptorrent development team2021-09-291-5/+69
| | | | No need to split the original file on the server side.
* do not activate clients without redirection via POSTtiptorrent development team2021-09-291-1/+1
| | | | | update 4573deb8cb3 to skip clients without redirection after receiving POST notification.
* allow to report that a client allows redirection with POST methodtiptorrent development team2021-09-291-1/+18
| | | | | | | | | If clients sends POST /test, it notifies the server that it is available for receive redirections from file 'test'. Test it with wget: wget --post-data '' http://localhost:9999/TEST -O /dev/null
* do not shadow global redirect variabletiptorrent development team2021-09-291-3/+3
|
* check sendfile errortiptorrent development team2021-09-291-1/+2
|
* update num_clients and redirection only for large filestiptorrent development team2021-09-291-7/+9
| | | | Skip num_clients and redirection update for small files.
* add support for HEAD methodtiptorrent development team2021-09-291-3/+19
|
* add a close wait statetiptorrent development team2021-09-291-1/+3
| | | | | | | | | Wait for clients to close the connection, then: - create redirection. - activate pending clients. Do no refresh timeout while in close wait state.
* activate pending clients only for large filestiptorrent development team2021-09-291-1/+1
| | | | | small files should not activate pending clients, otherwise max_clients is not fulfilled.
* initial committiptorrent development team2021-09-291-0/+155