diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-09-06 14:29:51 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-06 14:31:29 -0700 |
commit | 56c31ac07e737eb0566c21f08612c04371eb9e68 (patch) | |
tree | 6d8a8869a4c7acf0511269ddc6a521f81c9b4ed3 | |
parent | 48d5cd51210aa3d9e6efb0989b9a6df1e8623fb3 (diff) | |
download | unicorn-56c31ac07e737eb0566c21f08612c04371eb9e68.tar.gz |
This should make code easier to read and follow.
-rw-r--r-- | ext/unicorn_http/unicorn_http.rl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl index 07a9881..99f0ff6 100644 --- a/ext/unicorn_http/unicorn_http.rl +++ b/ext/unicorn_http/unicorn_http.rl @@ -188,6 +188,8 @@ static void write_value(VALUE req, struct http_parser *hp, } else if (f == g_http_trailer) { HP_FL_SET(hp, HASTRAILER); hp_invalid_if_trailer(hp); + } else { + assert(OBJ_FROZEN(f) && "unfrozen object returned"); } e = rb_hash_aref(req, f); @@ -391,6 +393,8 @@ static void finalize_header(struct http_parser *hp, VALUE req) rb_hash_aset(req, g_rack_url_scheme, temp); } else if (STR_CSTR_EQ(temp, "https")) { server_port = g_port_443; + } else { + assert(server_port == g_port_80 && "server_port not set"); } /* parse and set the SERVER_NAME and SERVER_PORT variables */ |