do not shadow global redirect variable
parent
e46be236c7
commit
dab82c806f
|
@ -57,8 +57,8 @@ int tip_client_state_process_payload(struct tip_client *cli)
|
|||
const char *trailer, *x_redirect;
|
||||
bool allow_redirect = true;
|
||||
char _uri[32], *uri = _uri;
|
||||
char allow_redirect_str[5];
|
||||
char path[PATH_MAX + 1];
|
||||
char redirect[5];
|
||||
struct stat st;
|
||||
int err;
|
||||
|
||||
|
@ -80,8 +80,8 @@ int tip_client_state_process_payload(struct tip_client *cli)
|
|||
|
||||
x_redirect = strstr(cli->buf, "X-Accept-Redirect: ");
|
||||
if (x_redirect &&
|
||||
sscanf(x_redirect, "X-Accept-Redirect: %4s", redirect) == 1 &&
|
||||
!strncmp(redirect, "off", strlen("off")))
|
||||
sscanf(x_redirect, "X-Accept-Redirect: %4s", allow_redirect_str) == 1 &&
|
||||
!strncmp(allow_redirect_str, "off", strlen("off")))
|
||||
allow_redirect = false;
|
||||
|
||||
trailer = strstr(cli->buf, "\r\n\r\n");
|
||||
|
|
Loading…
Reference in New Issue