From daecee105fa0463f53adc0c02bd777f37b137321 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Sun, 21 May 2006 10:25:19 +0000 Subject: Two typos fixed, reported by Rui Lopes. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@202 19e92222-5c0b-0410-8929-a290d50e31e9 --- ext/http11/http11.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/http11/http11.c b/ext/http11/http11.c index f73d872..d81f741 100644 --- a/ext/http11/http11.c +++ b/ext/http11/http11.c @@ -32,6 +32,8 @@ static VALUE global_mongrel_version; static VALUE global_server_software; 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."; @@ -63,7 +65,7 @@ void http_field(void *data, const char *field, size_t flen, const char *value, s v = rb_str_new(value, vlen); f = rb_str_dup(global_http_prefix); f = rb_str_buf_cat(f, field, flen); - + for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) { if(*ch == '-') { *ch = '_'; @@ -100,7 +102,7 @@ void query_string(void *data, const char *at, size_t length) { VALUE req = (VALUE)data; VALUE val = Qnil; - + VALIDATE_MAX_LENGTH(length, QUERY_STRING); val = rb_str_new(at, length); @@ -337,7 +339,6 @@ void URIClassifier_free(void *data) } -#define TRIE_INCREASE 30 VALUE URIClassifier_alloc(VALUE klass) { -- cgit v1.2.3-24-ge0c7