diff options
-rw-r--r-- | src/handler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handler.c b/src/handler.c index 8e81c1f..5bcef6b 100644 --- a/src/handler.c +++ b/src/handler.c @@ -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"); |