From 7eccef471a609c87281bb90d9d3b3d7a7b35709e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 12 Apr 2012 07:40:46 +0000 Subject: http: increase REQUEST_PATH maximum length to 4K The previous REQUEST_PATH limit of 1024 is relatively small and some users encounter problems with long URLs. 4K is a common limit for PATH_MAX on modern GNU/Linux systems and REQUEST_PATH is likely to translate to a filesystem path name. Thanks to Nuo Yan and Lawrence Pit for their feedback on this issue. ref: http://mid.gmane.org/CB935F19-72B8-4EC2-8A1D-5084B37C09F2@gmail.com --- ext/unicorn_http/global_variables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/unicorn_http/global_variables.h b/ext/unicorn_http/global_variables.h index aa0d777..e1c43c9 100644 --- a/ext/unicorn_http/global_variables.h +++ b/ext/unicorn_http/global_variables.h @@ -62,9 +62,9 @@ NORETURN(static void parser_raise(VALUE klass, const char *)); /* Defines the maximum allowed lengths for various input elements.*/ DEF_MAX_LENGTH(FIELD_NAME, 256); DEF_MAX_LENGTH(FIELD_VALUE, 80 * 1024); -DEF_MAX_LENGTH(REQUEST_URI, 1024 * 12); +DEF_MAX_LENGTH(REQUEST_URI, 1024 * 15); DEF_MAX_LENGTH(FRAGMENT, 1024); /* Don't know if this length is specified somewhere or not */ -DEF_MAX_LENGTH(REQUEST_PATH, 1024); +DEF_MAX_LENGTH(REQUEST_PATH, 4096); /* common PATH_MAX on modern systems */ DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10)); static void init_globals(void) -- cgit v1.2.3-24-ge0c7