about summary refs log tree commit homepage
path: root/ext/unicorn/http11/http11.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-04-21 11:14:46 -0700
committerEric Wong <normalperson@yhbt.net>2009-04-21 11:16:29 -0700
commit44d731cebec9c95e3a5cfc1fe7b7aeafcb3fe3b4 (patch)
tree6314df91feba8944b0104cd631b659d4267a435c /ext/unicorn/http11/http11.c
parent7b6512704b53065fc12fedf1341657435c91d0a4 (diff)
downloadunicorn-44d731cebec9c95e3a5cfc1fe7b7aeafcb3fe3b4.tar.gz
There's no point in having redefinable callbacks if they're
always going to be pointed to the same function.  This reduces
the size of the http_parser structure to half its original size.

This change may actually make more sense in servers Mongrel/Thin
than Unicorn since Unicorn only has one parser per-process while
other servers can have hundreds or even thousands.
Diffstat (limited to 'ext/unicorn/http11/http11.c')
-rw-r--r--ext/unicorn/http11/http11.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/ext/unicorn/http11/http11.c b/ext/unicorn/http11/http11.c
index fbe2432..3b21d27 100644
--- a/ext/unicorn/http11/http11.c
+++ b/ext/unicorn/http11/http11.c
@@ -308,14 +308,6 @@ static VALUE HttpParser_alloc(VALUE klass)
   VALUE obj;
   http_parser *hp = ALLOC_N(http_parser, 1);
   TRACE();
-  hp->http_field = http_field;
-  hp->request_method = request_method;
-  hp->request_uri = request_uri;
-  hp->fragment = fragment;
-  hp->request_path = request_path;
-  hp->query_string = query_string;
-  hp->http_version = http_version;
-  hp->header_done = header_done;
   http_parser_init(hp);
 
   obj = Data_Wrap_Struct(klass, NULL, HttpParser_free, hp);