Permalink
Browse files

git-svn-id: svn://cherokee-project.com/cherokee/trunk@2652 5dc97367-9…

…7f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent a3c7b52 commit dd0a852a94ae8aefb33539b114ba2de5b0df5679 @alobbs alobbs committed Dec 27, 2008
View
@@ -1,3 +1,25 @@
+2008-12-27 Alvaro Lopez Ortega <alvaro@octality.com>
+
+ * cherokee/main_worker.c, cherokee/Makefile.am ,
+ cherokee/socket.c, cherokee/connection-protected.h ,
+ cherokee/socket.h, cherokee/handler_server_info.c ,
+ cherokee/handler_cgi_base.c, cherokee/handler_dirlist.c ,
+ cherokee/handler_dirlist.h, cherokee/main_admin.c ,
+ cherokee/thread.c, cherokee/thread.h, cherokee/handler_error.c ,
+ cherokee/server-protected.h, cherokee/admin_server.c ,
+ cherokee/connection.c, cherokee/server.c, cherokee/bind.c ,
+ cherokee/bind.h, performance.conf.sample.pre ,
+ cherokee.conf.sample.pre, configure.in, contrib/Makefile.am ,
+ contrib/011to098.py, qa/run-tests.py: This patch rework the server
+ core. Now the server can listen as many ports/binds as
+ needed (instead of one for http and another for https). This is a
+ really disruptive change: the configuration file has changed - a
+ conversion script has been included. As far as my tests have
+ concluded, there is no negative performance impact, but it is
+ something we should investigate further. Beware: The
+ administration interface still needs to be updated to the new
+ format.
+
2008-12-25 Alvaro Lopez Ortega <alvaro@octality.com>
* cherokee/handler_dbslayer.c (send_query): Fixes a parsing
View
@@ -8,8 +8,9 @@
# Server
#
-server!port = 80
-server!port_tls = 443
+server!bind!1!port = 80
+server!bind!2!port = 443
+server!bind!2!tls = 1
server!timeout = 15
server!keepalive = 1
server!keepalive_max_requests = 500
View
@@ -1203,6 +1203,8 @@ config_entry.c \
server-protected.h \
server.h \
server.c \
+bind.h \
+bind.c \
virtual_server_names.h \
virtual_server_names.c \
virtual_server.h \
View
@@ -36,11 +36,33 @@
ret_t
cherokee_admin_server_reply_get_port (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
+ cherokee_list_t *i;
+ cuint_t n = 0;
cherokee_server_t *srv = HANDLER_SRV(ahdl);
UNUSED(question);
- cherokee_buffer_add_va (reply, "server.port is %d\n", srv->port);
+ list_for_each (i, &srv->listeners) {
+ if (! BIND_IS_TLS(i))
+ n += 1;
+ }
+
+ cherokee_buffer_add_str (reply, "server.port is ");
+ list_for_each (i, &srv->listeners) {
+ if (! BIND_IS_TLS(i)) {
+ n -= 1;
+ if (! cherokee_buffer_is_empty (&BIND(i)->ip)) {
+ cherokee_buffer_add_buffer (reply, &BIND(i)->ip);
+ cherokee_buffer_add_char (reply, ':');
+ }
+ cherokee_buffer_add_ulong10 (reply, BIND(i)->port);
+ if (n > 0) {
+ cherokee_buffer_add_char (reply, ',');
+ }
+ }
+ }
+ cherokee_buffer_add_char (reply, '\n');
+
return ret_ok;
}
@@ -63,11 +85,33 @@ cherokee_admin_server_reply_set_port (cherokee_handler_admin_t *ahdl, cherokee_b
ret_t
cherokee_admin_server_reply_get_port_tls (cherokee_handler_admin_t *ahdl, cherokee_buffer_t *question, cherokee_buffer_t *reply)
{
+ cherokee_list_t *i;
+ cuint_t n = 0;
cherokee_server_t *srv = HANDLER_SRV(ahdl);
UNUSED(question);
- cherokee_buffer_add_va (reply, "server.port_tls is %d\n", srv->port_tls);
+ list_for_each (i, &srv->listeners) {
+ if (BIND_IS_TLS(i))
+ n += 1;
+ }
+
+ cherokee_buffer_add_str (reply, "server.port_tls is ");
+ list_for_each (i, &srv->listeners) {
+ if (BIND_IS_TLS(i)) {
+ n -= 1;
+ if (! cherokee_buffer_is_empty (&BIND(i)->ip)) {
+ cherokee_buffer_add_buffer (reply, &BIND(i)->ip);
+ cherokee_buffer_add_char (reply, ':');
+ }
+ cherokee_buffer_add_ulong10 (reply, BIND(i)->port);
+ if (n > 0) {
+ cherokee_buffer_add_char (reply, ',');
+ }
+ }
+ }
+ cherokee_buffer_add_char (reply, '\n');
+
return ret_ok;
}
Oops, something went wrong.

0 comments on commit dd0a852

Please sign in to comment.