On 03 Dec 2011, at 12:42 AM, [email protected] wrote:

> Author: minfrin
> Date: Fri Dec  2 22:42:39 2011
> New Revision: 1209754
> 
> URL: http://svn.apache.org/viewvc?rev=1209754&view=rev
> Log:
> mod_proxy: Make ap_proxy_retry_worker() into an optional function. Allows
> mod_lbmethod_bybusyness, mod_lbmethod_byrequests, mod_lbmethod_bytraffic
> and mod_lbmethod_heartbeat to be loaded without mod_proxy yet being present,
> which happens when modules are loaded in alphabetical order.

The proxy modules need a bunch more refactoring like this so that the modules 
can be loaded cleanly in any order.

Right now, we've gotten away with this due to the alphabetical naming of the 
proxy modules, sorted alphabetically mod_proxy comes before mod_proxy_http, and 
it just so happens mod_proxy_http depends on a lot of symbols provided by 
mod_proxy, so we work by accident.

The above change solves the problem for the mod_lbmethod_* modules, which sort 
alphabetically before mod_proxy and so cause a problem for people.

While I want to backport this change to v2.4, we don't have to backport the 
rest of the changes if doing so will delay httpd v2.4 for any length of time. 
Right now I have a bit of time, so am keen to do it.

There are also functions in mod_proxy that are only used by a single 
mod_proxy_* module which ideally should be moved to the module that needs it.

The full picture of the functions affected when mod_proxy is not loaded but 
everything else is looks like below. Seems like there is a lot of stuff that 
ideally should be moved from mod_proxy to mod_proxy_balancer.

Undefined symbols:
  "_ap_proxy_canon_netloc", referenced from:
      _proxy_ftp_canon in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_balancer_canon in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _proxy_http_canon in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_initialize_balancer", referenced from:
      _balancer_child_init in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_acquire_connection", referenced from:
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_http_handler in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_pre_http_request", referenced from:
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_location_reverse_map", referenced from:
      _transform_hdrs.13192 in libmod_proxy_http.a(mod_proxy_http.o)
      _transform_hdrs.13192 in libmod_proxy_http.a(mod_proxy_http.o)
      _transform_hdrs.13192 in libmod_proxy_http.a(mod_proxy_http.o)
      _transform_hdrs.13192 in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_string_read", referenced from:
      _ftp_getrc_msg in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ftp_getrc_msg in libmod_proxy_ftp.a(mod_proxy_ftp.o)
  "_ap_proxy_canonenc", referenced from:
      _proxy_ftp_canon in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_canon in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_canon in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_canon in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_balancer_canon in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _proxy_http_canon in libmod_proxy_http.a(mod_proxy_http.o)
  "_proxy_hook_post_request", referenced from:
      _ap_proxy_balancer_register_hook in 
libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_initialize_worker", referenced from:
      _init_balancer_members in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_liststr", referenced from:
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_parse_wstatus", referenced from:
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_ssl_enable", referenced from:
      _proxy_http_handler in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_ssl_connection_cleanup", referenced from:
      _proxy_http_handler in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_get_balancer", referenced from:
      _proxy_balancer_pre_request in 
libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_connect_backend", referenced from:
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_http_handler in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_date_canon", referenced from:
      _process_proxy_header in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_release_connection", referenced from:
      _proxy_ftp_cleanup in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_cleanup in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_ssl_disable", referenced from:
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
  "_ap_proxy_set_wstatus", referenced from:
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_cookie_reverse_map", referenced from:
      _transform_hdrs.13192 in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_share_worker", referenced from:
      _balancer_post_config in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_hex2c", referenced from:
      _decodeenc in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ftp_check_string in libmod_proxy_ftp.a(mod_proxy_ftp.o)
  "_ap_proxy_connection_create", referenced from:
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_http_handler in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_define_worker", referenced from:
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_share_balancer", referenced from:
      _balancer_post_config in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_determine_connection", referenced from:
      _proxy_http_handler in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_make_fake_req", referenced from:
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_get_worker", referenced from:
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxyerror", referenced from:
      _ftp_set_TYPE in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ftp_set_TYPE in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ftp_get_PWD in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ftp_proxyerror in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _rewrite_url in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _pass_brigade in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_strncpy", referenced from:
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_ap_proxy_backend_broke", referenced from:
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_proxy_run_fixups", referenced from:
      _ap_proxy_http_request in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_sync_balancer", referenced from:
      _proxy_balancer_pre_request in 
libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
  "_proxy_hook_canon_handler", referenced from:
      _ap_proxy_ftp_register_hook in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ap_proxy_balancer_register_hook in 
libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _ap_proxy_http_register_hook in libmod_proxy_http.a(mod_proxy_http.o)
  "_proxy_hook_scheme_handler", referenced from:
      _ap_proxy_ftp_register_hook in libmod_proxy_ftp.a(mod_proxy_ftp.o)
      _ap_proxy_http_register_hook in libmod_proxy_http.a(mod_proxy_http.o)
  "_proxy_module", referenced from:
      _xlate_name in libmod_proxy_express.a(mod_proxy_express.o)
      _lock_remove in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_post_config in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_post_config in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_handler in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _balancer_child_init in libmod_proxy_balancer.a(mod_proxy_balancer.o)
      _ap_proxy_http_request in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_read_headers in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_read_headers in libmod_proxy_http.a(mod_proxy_http.o)
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_buckets_lifetime_transform", referenced from:
      _ap_proxy_http_process_response in libmod_proxy_http.a(mod_proxy_http.o)
  "_ap_proxy_checkproxyblock", referenced from:
      _proxy_ftp_handler in libmod_proxy_ftp.a(mod_proxy_ftp.o)
  "_proxy_hook_pre_request", referenced from:
      _ap_proxy_balancer_register_hook in 
libmod_proxy_balancer.a(mod_proxy_balancer.o)

Regards,
Graham
--

Reply via email to