handler: no need to parse trailer when processing request
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.master
parent
db1e0f1799
commit
87ece3976b
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue