Changeset 529

Show
Ignore:
Timestamp:
12/21/06 19:57:43 (2 years ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r528 r529  
     12006-12-21  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/balancer.c (cherokee_balancer_configure): Added a new 
     4        "host" type.  It allows to add pure host nodes to a balancer (so 
     5        far, it only supported "interpreter" entries). 
     6 
     7        * configure.in, cherokee/Makefile.am: Added support for the new 
     8        mirror module. 
     9 
     10        * cherokee/source.c (cherokee_source_new): Added new function.  
     11 
     12        * cherokee/handler_mirror.h, cherokee/handler_mirror.c: Added new 
     13        handler.  It implements a redirector based on the balancer 
     14        modules.  Basically, it relays the request on a host port pair and 
     15        then forwards the response to the client. 
     16 
    1172006-12-19  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
    218 
     
    19791995 
    19801996        * cherokee/header.c (cherokee_header_get_request_w_args): Added 
    1981         new funcion. 
     1997        new function. 
    19821998 
    19831999        * qa/107-Priority1.py, qa/108-Priority2.py, qa/109-Priority3.py, 
     
    456545812004-05-23  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
    45664582 
    4567         * src/main.c (panic_handler): Funcion `panic' has been renamed to 
     4583        * src/main.c (panic_handler): Function `panic' has been renamed to 
    45684584        panic_handler because it was causing a linkage error on MacOS X. 
    45694585 
     
    65776593 
    65786594        * aclocal.m4 (HAVE_PTHREAD): Removed SAMBA_SENDFILE 
    6579         funcion.  Added sendfile.samba.m4 
     6595        function.  Added sendfile.samba.m4 
    65806596 
    65816597        * etr_socket_nsl.m4: Added new func ETR_SOCKET_NSL 
  • cherokee/trunk/cherokee/Makefile.am

    r495 r529  
    350350else 
    351351dynamic_handler_proxy_lib = libplugin_proxy.la 
     352endif 
     353 
     354 
     355# 
     356# Handler mirror 
     357# 
     358handler_mirror = \ 
     359handler_mirror.c \ 
     360handler_mirror.h 
     361 
     362libplugin_mirror_la_LDFLAGS = $(module_ldflags)   
     363libplugin_mirror_la_SOURCES = $(handler_mirror) 
     364libplugin_mirror_la_LIBADD  = libcherokee-client.la   
     365 
     366if STATIC_HANDLER_MIRROR 
     367static_handler_mirror_src = $(handler_mirror) 
     368else 
     369dynamic_handler_mirror_lib = libplugin_mirror.la 
    352370endif 
    353371 
     
    791809$(static_handler_nn_src) \ 
    792810$(static_handler_proxy_src) \ 
     811$(static_handler_mirror_src) \ 
    793812$(static_handler_server_info_src) \ 
    794813\ 
     
    921940$(dynamic_handler_redir_lib) \ 
    922941$(dynamic_handler_proxy_lib) \ 
     942$(dynamic_handler_mirror_lib) \ 
    923943$(dynamic_handler_error_redir_lib) \ 
    924944$(dynamic_handler_common_lib) \ 
  • cherokee/trunk/cherokee/balancer.c

    r476 r529  
    6767cherokee_balancer_configure (cherokee_balancer_t *balancer, cherokee_config_node_t *conf) 
    6868{ 
    69         ret_t              ret; 
    70         cherokee_list_t   *i; 
    71         cherokee_buffer_t *buf; 
    72         cherokee_boolean_t interpreter = false; 
     69        ret_t               ret; 
     70        cherokee_list_t    *i; 
     71        cherokee_buffer_t  *buf; 
     72        cherokee_boolean_t  interpreter = false; 
     73        cherokee_boolean_t  host        = false; 
    7374 
    7475        /* Look for the type of the source objects 
     
    8283        if (equal_buf_str (buf, "interpreter")) { 
    8384                interpreter = true; 
     85        } else if (equal_buf_str (buf, "host")) { 
     86                host = true; 
    8487        } else { 
    8588                PRINT_ERROR ("ERROR: Balancer: Unknown type '%s'\n", buf->buf); 
     
    106109 
    107110                        src = SOURCE(src2); 
     111 
     112                } else if (host) { 
     113                        ret = cherokee_source_new (&src); 
     114                        if (ret != ret_ok) return ret; 
     115                         
     116                        ret = cherokee_source_configure (src, subconf); 
     117                        if (ret != ret_ok) return ret; 
    108118                } 
    109119                 
  • cherokee/trunk/cherokee/handler_file.c

    r527 r529  
    626626 
    627627ret_t 
    628 cherokee_handler_file_step (cherokee_handler_file_t *fhdl,  
    629                             cherokee_buffer_t       *buffer) 
     628cherokee_handler_file_step (cherokee_handler_file_t *fhdl, cherokee_buffer_t *buffer) 
    630629{ 
    631630        off_t                  total; 
  • cherokee/trunk/cherokee/source.c

    r500 r529  
    2929 
    3030#define ENTRIES "source,src" 
     31 
     32 
     33ret_t 
     34cherokee_source_new (cherokee_source_t **src) 
     35{ 
     36        CHEROKEE_NEW_STRUCT (n, source); 
     37         
     38        *src = n; 
     39        return cherokee_source_init (n); 
     40} 
    3141 
    3242 
  • cherokee/trunk/cherokee/source.h

    r387 r529  
    4949#define SOURCE(s)  ((cherokee_source_t *)(s)) 
    5050 
    51 ret_t cherokee_source_init      (cherokee_source_t *src); 
    52 ret_t cherokee_source_mrproper  (cherokee_source_t *src); 
    53 ret_t cherokee_source_configure (cherokee_source_t *src, cherokee_config_node_t *conf); 
     51ret_t cherokee_source_new       (cherokee_source_t **src); 
     52ret_t cherokee_source_init      (cherokee_source_t  *src); 
     53ret_t cherokee_source_mrproper  (cherokee_source_t  *src); 
     54ret_t cherokee_source_configure (cherokee_source_t  *src, cherokee_config_node_t *conf); 
    5455 
    55 ret_t cherokee_source_connect  (cherokee_source_t *src, cherokee_socket_t *socket); 
    56  
     56ret_t cherokee_source_connect   (cherokee_source_t  *src, cherokee_socket_t *socket); 
    5757 
    5858CHEROKEE_END_DECLS 
  • cherokee/trunk/configure.in

    r528 r529  
    991991           [use_static_module="$use_static_module $enableval "],[]) 
    992992 
    993 modules="error_redir server_info file admin dirlist fcgi fastcgi scgi redir common nn cgi phpcgi proxy gzip ncsa combined w3c pam ldap mysql htpasswd plain htdigest round_robin" 
     993modules="error_redir server_info file admin dirlist fcgi fastcgi scgi redir common nn cgi phpcgi proxy mirror gzip ncsa combined w3c pam ldap mysql htpasswd plain htdigest round_robin" 
    994994 
    995995# Remove modules that will not be compiles 
     
    10501050AM_CONDITIONAL(STATIC_HANDLER_PHPCGI,         grep phpcgi         $conf_h >/dev/null) 
    10511051AM_CONDITIONAL(STATIC_HANDLER_PROXY,          grep proxy          $conf_h >/dev/null) 
     1052AM_CONDITIONAL(STATIC_HANDLER_MIRROR,         grep mirror         $conf_h >/dev/null) 
    10521053AM_CONDITIONAL(STATIC_ENCODER_GZIP,           grep gzip           $conf_h >/dev/null) 
    10531054AM_CONDITIONAL(STATIC_LOGGER_NCSA,            grep ncsa           $conf_h >/dev/null)