From 16cc92dab608a3c83d9c1baa4dbdca307da12c9c Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Fri, 17 Sep 2021 16:45:52 +0200 Subject: 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 --- src/core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core.h') diff --git a/src/core.h b/src/core.h index 7d6d403..9da9340 100644 --- a/src/core.h +++ b/src/core.h @@ -29,6 +29,7 @@ enum tip_client_state { enum tip_http_method { TIP_METHOD_GET = 0, TIP_METHOD_HEAD, + TIP_METHOD_POST, }; struct tip_client { @@ -69,6 +70,8 @@ static inline bool tip_client_large_file(const struct tip_client *cli) void tip_client_pending(struct tip_client *cli); bool tip_client_redirect(struct tip_client *cli); +int tip_client_redirect_create(const struct tip_client *cli); +void tip_client_activate_pending(void); extern struct ev_loop *tip_main_loop; -- cgit v1.2.3-18-g5258