From cbcc71db72efb91adf7d7dac275de8ba4e12af0c Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Mon, 13 Sep 2021 11:32:21 +0200 Subject: add support for HEAD method --- src/core.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core.h') diff --git a/src/core.h b/src/core.h index 76cffa2..88a07a9 100644 --- a/src/core.h +++ b/src/core.h @@ -26,6 +26,11 @@ enum tip_client_state { TIP_CLIENT_CLOSE_WAIT, }; +enum tip_http_method { + TIP_METHOD_GET = 0, + TIP_METHOD_HEAD, +}; + struct tip_client { struct list_head list; struct ev_io io; @@ -39,6 +44,7 @@ struct tip_client { char auth_token[64]; /* for file serving. */ + enum tip_http_method method; const char *uri; const char *path; off_t size; @@ -73,12 +79,6 @@ int tip_client_state_process_payload(struct tip_client *cli); int tip_client_state_process_payload_reply(struct tip_client *cli); int tip_client_state_process_payload_bulk(struct tip_client *cli); -enum tip_http_method { - TIP_METHOD_GET = 0, - TIP_METHOD_POST, - TIP_METHOD_NO_HTTP -}; - struct tip_client_redirect { struct list_head list; struct sockaddr_in addr; -- cgit v1.2.3-18-g5258