0
static VALUE global_server_protocol_value;
0
static VALUE global_http_host;
0
static VALUE global_port_80;
0
-static VALUE global_http_body;
0
static VALUE global_url_scheme;
0
static VALUE global_url_scheme_value;
0
static VALUE global_script_name;
0
/** Defines global strings in the init method. */
0
#define DEF_GLOBAL(N, val) global_##N = rb_obj_freeze(rb_str_new2(val)); rb_global_variable(&global_##N)
0
-
void http_field(void *data, const char *field, size_t flen, const char *value, size_t vlen)
0
+
static void http_field(void *data, const char *field, size_t flen, const char *value, size_t vlen)
0
VALUE req = ((thin_connection_t*) data)->env;
0
rb_hash_aset(req, f, v);
0
-
void request_method(void *data, const char *at, size_t length)
0
+
static void request_method(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
rb_hash_aset(req, global_request_method, val);
0
-
void request_uri(void *data, const char *at, size_t length)
0
+
static void request_uri(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
rb_hash_aset(req, global_request_uri, val);
0
-
void fragment(void *data, const char *at, size_t length)
0
+
static void fragment(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
rb_hash_aset(req, global_fragment, val);
0
-
void request_path(void *data, const char *at, size_t length)
0
+
static void request_path(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
rb_hash_aset(req, global_path_info, val);
0
-
void query_string(void *data, const char *at, size_t length)
0
+
static void query_string(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
rb_hash_aset(req, global_query_string, val);
0
-
void http_version(void *data, const char *at, size_t length)
0
+
static void http_version(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
VALUE val = rb_str_new(at, length);
0
/** Finalizes the request header to have a bunch of stuff that's
0
-
void header_done(void *data, const char *at, size_t length)
0
+
static void header_done(void *data, const char *at, size_t length)
0
thin_connection_t *connection = (thin_connection_t*) data;
0
VALUE env = connection->env;
0
rb_hash_aset(env, global_script_name, global_empty);
0
-
void content_length(void *data, const char *at, size_t length)
0
+
static void content_length(void *data, const char *at, size_t length)
0
thin_connection_t *connection = (thin_connection_t*)(data);
0
rb_hash_aset(connection->env, global_content_length, val);
0
-
void content_type(void *data, const char *at, size_t length)
0
+
static void content_type(void *data, const char *at, size_t length)
0
VALUE req = ((thin_connection_t*) data)->env;
0
VALUE val = rb_str_new(at, length);
0
DEF_GLOBAL(server_protocol_value, "HTTP/1.1");
0
DEF_GLOBAL(http_host, "HTTP_HOST");
0
DEF_GLOBAL(port_80, "80");
0
- DEF_GLOBAL(http_body, "rack.input");
0
DEF_GLOBAL(url_scheme, "rack.url_scheme");
0
DEF_GLOBAL(url_scheme_value, "http");
0
DEF_GLOBAL(script_name, "SCRIPT_NAME");
Comments
No one has commented yet.