update maximum uri length to 255 chars
file with a large name might easily reach the existing 32 chars limit.master
parent
138539485c
commit
7bf3eebb98
|
@ -59,7 +59,7 @@ 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 _uri[256], *uri = _uri;
|
||||
char allow_redirect_str[5];
|
||||
char path[PATH_MAX + 1];
|
||||
char *chunk = NULL;
|
||||
|
@ -72,15 +72,15 @@ int tip_client_state_process_payload(struct tip_client *cli)
|
|||
|
||||
if (!strncmp(cli->buf, "GET", strlen("GET"))) {
|
||||
cli->method = TIP_METHOD_GET;
|
||||
if (sscanf(cli->buf, "GET %31s HTTP/1.1", uri) != 1)
|
||||
if (sscanf(cli->buf, "GET %255s HTTP/1.1", uri) != 1)
|
||||
return tip_client_method_not_found(cli);
|
||||
} else if (!strncmp(cli->buf, "HEAD", strlen("HEAD"))) {
|
||||
cli->method = TIP_METHOD_HEAD;
|
||||
if (sscanf(cli->buf, "HEAD %31s HTTP/1.1", uri) != 1)
|
||||
if (sscanf(cli->buf, "HEAD %255s HTTP/1.1", uri) != 1)
|
||||
return tip_client_method_not_found(cli);
|
||||
} else if (!strncmp(cli->buf, "POST", strlen("POST"))) {
|
||||
cli->method = TIP_METHOD_POST;
|
||||
if (sscanf(cli->buf, "POST %31s HTTP/1.1", uri) != 1)
|
||||
if (sscanf(cli->buf, "POST %255s HTTP/1.1", uri) != 1)
|
||||
return tip_client_method_not_found(cli);
|
||||
} else {
|
||||
return tip_client_method_not_found(cli);
|
||||
|
|
Loading…
Reference in New Issue