Commit Graph

11 Commits (97fc159ff1ddc44b658e99cb25adcaf3a5dbfe85)

Author SHA1 Message Date
tiptorrent development team 97fc159ff1 add basic uri sanitization
disallow .. in uri.
2021-09-29 15:49:13 +02:00
tiptorrent development team 324fdcfd58 runtime split original file into chunks
No need to split the original file on the server side.
2021-09-29 15:49:11 +02:00
tiptorrent development team 44287f9e67 do not activate clients without redirection via POST
update 4573deb8cb3 to skip clients without redirection after
receiving POST notification.
2021-09-29 15:48:59 +02:00
tiptorrent development team 16cc92dab6 allow to report that a client allows redirection with POST method
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
2021-09-29 15:48:43 +02:00
tiptorrent development team dab82c806f do not shadow global redirect variable 2021-09-29 15:48:40 +02:00
tiptorrent development team 21aa4a9315 check sendfile error 2021-09-29 15:48:18 +02:00
tiptorrent development team 7a04638c32 update num_clients and redirection only for large files
Skip num_clients and redirection update for small files.
2021-09-29 15:48:16 +02:00
tiptorrent development team cbcc71db72 add support for HEAD method 2021-09-29 15:48:14 +02:00
tiptorrent development team d6dbb6c979 add a close wait state
Wait for clients to close the connection, then:

- create redirection.
- activate pending clients.

Do no refresh timeout while in close wait state.
2021-09-29 15:48:11 +02:00
tiptorrent development team b07785d2d1 activate pending clients only for large files
small files should not activate pending clients, otherwise max_clients
is not fulfilled.
2021-09-29 15:48:03 +02:00
tiptorrent development team 2610239d62 initial commit 2021-09-29 15:47:43 +02:00