diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-17 16:45:52 +0200 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-29 15:48:43 +0200 |
commit | 16cc92dab608a3c83d9c1baa4dbdca307da12c9c (patch) | |
tree | 9c2bd5d3a7697aeca3ef314898fae03047a0576e /src/core.c | |
parent | dab82c806f35c671f87ea60087b19e3781b35a29 (diff) |
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
Diffstat (limited to 'src/core.c')
-rw-r--r-- | src/core.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -32,8 +32,6 @@ int num_clients; static LIST_HEAD(client_list); static LIST_HEAD(client_redirect_list); -static void tip_client_activate_pending(void); - static void tip_client_release(struct ev_loop *loop, struct tip_client *cli) { syslog(LOG_INFO, "closing connection with %s:%hu", @@ -111,8 +109,6 @@ static int tip_client_recv(struct tip_client *cli, int events) return ret; } -static int tip_client_redirect_create(const struct tip_client *cli); - static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int events) { struct tip_client *cli; @@ -217,7 +213,7 @@ static void tip_client_redirect_timer_cb(struct ev_loop *loop, ev_timer *timer, free(redir); } -static int tip_client_redirect_create(const struct tip_client *cli) +int tip_client_redirect_create(const struct tip_client *cli) { struct tip_client_redirect *redir; bool found = false; @@ -353,7 +349,7 @@ void tip_client_pending(struct tip_client *cli) cli->state = TIP_CLIENT_PENDING; } -static void tip_client_activate_pending(void) +void tip_client_activate_pending(void) { struct tip_client *cli, *next; |