source:
branches/fc13-dev/server/common/patches/httpd-fixup-vhost.patch
@
2339
Last change on this file since 2339 was 1602, checked in by gdb, 14 years ago | |
---|---|
File size: 3.5 KB |
-
include/http_config.h
commit 3b081163d6250d893838d69d9a83f217c341d657 Author: Greg Brockman <gdb@mit.edu> Date: Fri Aug 6 23:19:15 2010 -0400 Add method to merge virtual host with a main server_rec diff --git a/include/http_config.h b/include/http_config.h index 5e9fd51..8e6f247 100644
a b AP_DECLARE(void) ap_register_hooks(module *m, apr_pool_t *p); 827 827 AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, 828 828 server_rec *main_server); 829 829 830 /** 831 * Setup a single virtual host by merging the main server_rec into it. 832 * @param p The pool to allocate from 833 * @param main_server The server_rec with which to merge 834 * @param virt The virtual host server_rec with some set of directives to override already set 835 */ 836 AP_DECLARE(void) ap_fixup_virtual_host(apr_pool_t *p, 837 server_rec *main_server, 838 server_rec *virt); 839 830 840 /* For http_request.c... */ 831 841 832 842 /** -
server/config.c
diff --git a/server/config.c b/server/config.c index 101d0e4..ef0f2ba 100644
a b AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p, 1902 1902 } 1903 1903 1904 1904 1905 AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server) 1905 AP_DECLARE(void) ap_fixup_virtual_host(apr_pool_t *p, server_rec *main_server, 1906 server_rec *virt) 1906 1907 { 1907 server_rec *virt; 1908 merge_server_configs(p, main_server->module_config, 1909 virt->module_config); 1908 1910 1909 for (virt = main_server->next; virt; virt = virt->next) {1910 merge_server_configs(p, main_server->module_config,1911 virt->module_config);1911 virt->lookup_defaults = 1912 ap_merge_per_dir_configs(p, main_server->lookup_defaults, 1913 virt->lookup_defaults); 1912 1914 1913 virt->lookup_defaults = 1914 ap_merge_per_dir_configs(p, main_server->lookup_defaults, 1915 virt->lookup_defaults); 1915 if (virt->server_admin == NULL) 1916 virt->server_admin = main_server->server_admin; 1916 1917 1917 if (virt->server_admin == NULL)1918 virt->server_admin = main_server->server_admin;1918 if (virt->timeout == 0) 1919 virt->timeout = main_server->timeout; 1919 1920 1920 if (virt->timeout == 0)1921 virt->timeout = main_server->timeout;1921 if (virt->keep_alive_timeout == 0) 1922 virt->keep_alive_timeout = main_server->keep_alive_timeout; 1922 1923 1923 if (virt->keep_alive_timeout == 0)1924 virt->keep_alive_timeout = main_server->keep_alive_timeout;1924 if (virt->keep_alive == -1) 1925 virt->keep_alive = main_server->keep_alive; 1925 1926 1926 if (virt->keep_alive== -1)1927 virt->keep_alive = main_server->keep_alive;1927 if (virt->keep_alive_max == -1) 1928 virt->keep_alive_max = main_server->keep_alive_max; 1928 1929 1929 if (virt->keep_alive_max == -1) 1930 virt->keep_alive_max = main_server->keep_alive_max; 1930 /* XXX: this is really something that should be dealt with by a 1931 * post-config api phase 1932 */ 1933 ap_core_reorder_directories(p, virt); 1934 } 1931 1935 1932 /* XXX: this is really something that should be dealt with by a 1933 * post-config api phase 1934 */ 1935 ap_core_reorder_directories(p, virt); 1936 } 1936 AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server) 1937 { 1938 server_rec *virt; 1939 1940 for (virt = main_server->next; virt; virt = virt->next) 1941 ap_fixup_virtual_host(p, main_server, virt); 1937 1942 1938 1943 ap_core_reorder_directories(p, main_server); 1939 1944 }
Note: See TracBrowser
for help on using the repository browser.