diff options
author | Ian Holsman <ianh@apache.org> | 2001-11-23 16:35:22 +0000 |
---|---|---|
committer | Ian Holsman <ianh@apache.org> | 2001-11-23 16:35:22 +0000 |
commit | 86b792b21c8bdab5ef9416d1bef14f849ad8f702 (patch) | |
tree | 0325a6668e30c94aad21e0e7f0ecba9e00194ee0 /modules/http | |
parent | 0e00ed6428827c5fb07de1bff24681ad2b8233c3 (diff) | |
download | httpd-86b792b21c8bdab5ef9416d1bef14f849ad8f702.tar.gz |
Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully
PR:
Obtained from:
Submitted by:
Reviewed by: (Idea only Jeff Trawick)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r-- | modules/http/mod_mime.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 1721e3ec0c..041f5ed09f 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -428,7 +428,7 @@ AP_INIT_TAKE1("TypesConfig", set_types_config, NULL, RSRC_CONF, static apr_hash_t *mime_type_extensions; -static void mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) +static int mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { ap_configfile_t *f; char l[MAX_STRING_LEN]; @@ -443,7 +443,7 @@ static void mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, if ((status = ap_pcfg_openfile(&f, ptemp, types_confname)) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, status, s, "could not open mime types config file %s.", types_confname); - exit(1); + return HTTP_INTERNAL_SERVER_ERROR; } mime_type_extensions = apr_hash_make(p); @@ -462,6 +462,7 @@ static void mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, } } ap_cfg_closefile(f); + return OK; } static char *zap_sp(char *s) |