1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Switched to C-Style comments in http11.c so that it will now compile in Solaris 2.9. [#11728]

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@570 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
wayneeseguin 2007-08-19 16:12:11 +00:00
parent 16090717f2
commit 13e3a7fc44

View file

@ -157,7 +157,7 @@ void header_done(void *data, const char *at, size_t length)
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
/* ruby better close strings off with a '\0' dammit */
colon = strchr(RSTRING(temp)->ptr, ':');
if(colon != NULL) {
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
@ -170,7 +170,7 @@ void header_done(void *data, const char *at, size_t length)
}
}
// grab the initial body and stuff it into an ivar
/* grab the initial body and stuff it into an ivar */
rb_ivar_set(req, id_http_body, rb_str_new(at, length));
rb_hash_aset(req, global_server_protocol, global_server_protocol_value);
rb_hash_aset(req, global_server_software, global_mongrel_version);
@ -392,7 +392,7 @@ VALUE URIClassifier_init(VALUE self)
{
VALUE hash;
// we create an internal hash to protect stuff from the GC
/* we create an internal hash to protect stuff from the GC */
hash = rb_hash_new();
rb_ivar_set(self, id_handler_map, hash);
@ -508,23 +508,23 @@ VALUE URIClassifier_resolve(VALUE self, VALUE uri)
handler = tst_search(uri_str, tst, &pref_len);
// setup for multiple return values
/* setup for multiple return values */
result = rb_ary_new();
if(handler) {
rb_ary_push(result, rb_str_substr (uri, 0, pref_len));
// compensate for a script_name="/" where we need to add the "/" to path_info to keep it consistent
/* compensate for a script_name="/" where we need to add the "/" to path_info to keep it consistent */
if(pref_len == 1 && uri_str[0] == '/') {
// matches the root URI so we have to use the whole URI as the path_info
/* matches the root URI so we have to use the whole URI as the path_info */
rb_ary_push(result, uri);
} else {
// matches a script so process like normal
/* matches a script so process like normal */
rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
}
rb_ary_push(result, (VALUE)handler);
} else {
// not found so push back nothing
/* not found so push back nothing */
rb_ary_push(result, Qnil);
rb_ary_push(result, Qnil);
rb_ary_push(result, Qnil);
@ -579,5 +579,3 @@ void Init_http11()
rb_define_method(cURIClassifier, "unregister", URIClassifier_unregister, 1);
rb_define_method(cURIClassifier, "resolve", URIClassifier_resolve, 1);
}