diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-04-03 15:22:17 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-04-03 15:22:17 +0000 |
commit | 5d600bfd240a09df159b83460b81626f71ce5029 (patch) | |
tree | 49dd65530cdb35105b2c9c9bdda42f3721831972 /ext | |
parent | 3c804d5e15f084cd5aec5f7184dbffc1d7350951 (diff) | |
download | unicorn-5d600bfd240a09df159b83460b81626f71ce5029.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@139 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'ext')
-rw-r--r-- | ext/http11/http11.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/http11/http11.c b/ext/http11/http11.c index d89f0d4..55ecc0f 100644 --- a/ext/http11/http11.c +++ b/ext/http11/http11.c @@ -124,10 +124,20 @@ void header_done(void *data, const char *at, size_t length) VALUE temp = Qnil; VALUE host = Qnil; VALUE port = Qnil; + VALUE ctype = Qnil; + VALUE clen = Qnil; char *colon = NULL; - rb_hash_aset(req, global_content_length, rb_hash_aref(req, global_http_content_length)); - rb_hash_aset(req, global_content_type, rb_hash_aref(req, global_http_content_type)); + clen = rb_hash_aref(req, global_http_content_length); + if(clen != Qnil) { + rb_hash_aset(req, global_content_length, clen); + } + + ctype = rb_hash_aref(req, global_http_content_type); + if(ctype != Qnil) { + rb_hash_aset(req, global_content_type, Qnil); + } + rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value); if((temp = rb_hash_aref(req, global_http_host)) != Qnil) { // ruby better close strings off with a '\0' dammit |