summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-01-11 12:43:22 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-01-11 12:45:18 +0100
commit87ece3976b3d68af2620f7b90ef8e10416abd231 (patch)
treedd2a5cffb098855de1557d64cd2bc0712b99ea3f
parentdb1e0f17993d2f0834079b3d868c710b8821ef92 (diff)
handler: no need to parse trailer when processing requestHEADmaster
No need to parse HTTP header trailer in TIP_CLIENT_PROCESSING_REQUEST. src/handler.c:62:14: warning: variable ‘trailer’ set but not used [-Wunused-but-set-variable] 62 | const char *trailer, *x_redirect; | ^~~~~~~ tip_client_state_recv_hdr() already validates header trailer is present.
-rw-r--r--src/handler.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/handler.c b/src/handler.c
index bc8af39..a6617ca 100644
--- a/src/handler.c
+++ b/src/handler.c
@@ -59,11 +59,11 @@ static bool sanitize(const char *uri)
int tip_client_state_process_payload(struct tip_client *cli)
{
- const char *trailer, *x_redirect;
bool allow_redirect = true;
char _uri[256], *uri = _uri;
char allow_redirect_str[5];
char path[PATH_MAX + 1];
+ const char *x_redirect;
char *chunk = NULL;
struct stat st;
int err;
@@ -94,8 +94,6 @@ int tip_client_state_process_payload(struct tip_client *cli)
!strncmp(allow_redirect_str, "off", strlen("off")))
allow_redirect = false;
- trailer = strstr(cli->buf, "\r\n\r\n");
-
if (!sanitize(uri))
return tip_client_method_not_found(cli);