diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-08-06 02:06:00 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-08-06 02:06:00 +0000 |
commit | 23076ba980a9b1cb894aa39f6cce3ed53fc474ad (patch) | |
tree | 932f1cda225e55a8a4fa7e44c2848f721642e5c6 /ext/http11/http11.c | |
parent | 9ffb99ce78f4683803ba3220d9cbfced7024a14e (diff) | |
download | unicorn-23076ba980a9b1cb894aa39f6cce3ed53fc474ad.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@306 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'ext/http11/http11.c')
-rw-r--r-- | ext/http11/http11.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/http11/http11.c b/ext/http11/http11.c index d69e347..0a0fef7 100644 --- a/ext/http11/http11.c +++ b/ext/http11/http11.c @@ -41,19 +41,19 @@ static VALUE global_port_80; #define TRIE_INCREASE 30 /** Defines common length and error messages for input length validation. */ -#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " # length " allowed length."; +#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " # length " allowed length." /** Validates the max length of given input and throws an HttpParserError exception if over. */ #define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, MAX_##N##_LENGTH_ERR); } /** Defines global strings in the init method. */ -#define DEF_GLOBAL(N, val) global_##N = rb_obj_freeze(rb_str_new2(val)); rb_global_variable(&global_##N); +#define DEF_GLOBAL(N, val) global_##N = rb_obj_freeze(rb_str_new2(val)); rb_global_variable(&global_##N) /* 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, 512); +DEF_MAX_LENGTH(REQUEST_URI, 1024); DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10)); DEF_MAX_LENGTH(HEADER, (1024 * (80 + 32))); |