]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1534995, r1560482, r1728779, r1805491, r1861528, r1868016, r1874470, r1874602...
authorJim Jagielski <jim@apache.org>
Thu, 23 Apr 2020 12:32:02 +0000 (12:32 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 23 Apr 2020 12:32:02 +0000 (12:32 +0000)
don't ignore some apr_procattr failures (clang scan-build)

doxygen improvements

Standardize order of "extern" and XXX_DECLARE_YYY.

Fix some compilation warning when MIME_MAGIC_DEBUG is defined.

warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument <n> has type ‘<something> *’ [-Wformat=]

style: cmd_rec at the bottom

no functional change

Fix a typo in a message.

Reported and fixed by Christian Bartolomäus (bartolin gmx.de)
PR 63806

malloc -> ap_malloc
bz #63967

Slighly simplify code.

No need to set to NULL or 0 fields that are apr_pcalloc'ed.
Axe 'set_cookie_enable' and use 'ap_set_flag_slot' instead.

(based on ideas taken from r1874389)

Parentheses around AP_BUCKET_IS_EOR argument.

Fix a typo
Submitted by: trawick, rjung, jailletc36, covener, jailletc36, gbechis, jailletc36, ylavic, jailletc36
Reviewed by: jailletc36, gbechis, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1876885 13f79535-47bb-0310-9956-ffa450edef68

14 files changed:
STATUS
include/ap_mpm.h
include/ap_regex.h
include/http_config.h
include/http_request.h
include/httpd.h
modules/mappers/mod_alias.c
modules/metadata/mod_mime_magic.c
modules/metadata/mod_usertrack.c
modules/proxy/proxy_util.h
modules/test/mod_dialup.c
server/log.c
server/mpm/winnt/mpm_winnt.c
server/protocol.c

diff --git a/STATUS b/STATUS
index 7bb4afaad6fdc761c9abde1e85e8e90a0ec3ddcd..b0ce7da6ee6a7dd15a3712442a837b5f1e167231 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -135,31 +135,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) Easy patches: synch 2.4.x and trunk
-        - core/log: don't ignore some apr_procattr failures (clang scan-build)
-        - doxygen improvements
-        - core: Standardize order of "extern" and XXX_DECLARE_YYY
-        - mod_mime_magic: Fix some compilation warning when MIME_MAGIC_DEBUG is defined.
-        - mod_alias: style: cmd_rec at the bottom
-        - core: Fix a typo in a message
-        - mpm_winnt: malloc -> ap_malloc
-        - mod_usertrack: Slighly simplify code
-        - code: Parentheses around AP_BUCKET_IS_EOR argument
-        - mod_dialup: Fix a typo
-     trunk patch:
-        - http://svn.apache.org/r1534995
-        - http://svn.apache.org/r1560482
-        - http://svn.apache.org/r1728779
-        - http://svn.apache.org/r1805491
-        - http://svn.apache.org/r1861528
-        - http://svn.apache.org/r1868016
-        - http://svn.apache.org/r1874470
-        - http://svn.apache.org/r1874602
-        - http://svn.apache.org/r1875769
-        - http://svn.apache.org/r1875811
-     2.4.x patch: svn merge -c 1534995,1560482,1728779,1805491,1861528,1868016,1874470,1874602,1875769,1875811 ^/httpd/httpd/trunk . 
-     +1: jailletc36, gbechis, jim
-
   *) core: default_handler: cleanup outputed brigade before leaving.
      trunk patch:
         - http://svn.apache.org/r1783041
index 71f8f47caa23d8630e34d807ee71eefebda49653..e3a58aa2a3c582f602a01916a08e0bb24393f4f8 100644 (file)
@@ -88,6 +88,7 @@ extern "C" {
  * @param plog the log pool, reset after the config file is read
  * @param server_conf the global server config.
  * @return DONE for shutdown OK otherwise.
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int, mpm, (apr_pool_t *pconf, apr_pool_t *plog, server_rec *server_conf))
 
@@ -113,42 +114,75 @@ AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
     apr_procattr_t *attr,
     apr_pool_t *p);
 
-/* Subtypes/Values for AP_MPMQ_IS_THREADED and AP_MPMQ_IS_FORKED        */
-#define AP_MPMQ_NOT_SUPPORTED      0  /* This value specifies that an */
-                                      /* MPM is not capable of        */
-                                      /* threading or forking.        */
-#define AP_MPMQ_STATIC             1  /* This value specifies that    */
-                                      /* an MPM is using a static     */
-                                      /* number of threads or daemons */
-#define AP_MPMQ_DYNAMIC            2  /* This value specifies that    */
-                                      /* an MPM is using a dynamic    */
-                                      /* number of threads or daemons */
-
-/* Values returned for AP_MPMQ_MPM_STATE */
+/** @defgroup mpmq MPM query
+ * @{
+ */
+
+/** @defgroup thrdfrk Subtypes/Values returned for AP_MPMQ_IS_THREADED and AP_MPMQ_IS_FORKED
+ *  @ingroup mpmq
+ *  @{
+ */
+#define AP_MPMQ_NOT_SUPPORTED      0  /**< This value specifies that an
+                                       * MPM is not capable of
+                                       * threading or forking.        */
+#define AP_MPMQ_STATIC             1  /**< This value specifies that
+                                       * an MPM is using a static
+                                       * number of threads or daemons */
+#define AP_MPMQ_DYNAMIC            2  /**< This value specifies that
+                                       * an MPM is using a dynamic
+                                       * number of threads or daemons */
+/** @} */
+
+/** @defgroup qstate Values returned for AP_MPMQ_MPM_STATE
+ *  @ingroup mpmq
+ *  @{
+ */
 #define AP_MPMQ_STARTING              0
 #define AP_MPMQ_RUNNING               1
 #define AP_MPMQ_STOPPING              2
+/** @} */
 
-#define AP_MPMQ_MAX_DAEMON_USED       1  /* Max # of daemons used so far */
-#define AP_MPMQ_IS_THREADED           2  /* MPM can do threading         */
-#define AP_MPMQ_IS_FORKED             3  /* MPM can do forking           */
-#define AP_MPMQ_HARD_LIMIT_DAEMONS    4  /* The compiled max # daemons   */
-#define AP_MPMQ_HARD_LIMIT_THREADS    5  /* The compiled max # threads   */
-#define AP_MPMQ_MAX_THREADS           6  /* # of threads/child by config */
-#define AP_MPMQ_MIN_SPARE_DAEMONS     7  /* Min # of spare daemons       */
-#define AP_MPMQ_MIN_SPARE_THREADS     8  /* Min # of spare threads       */
-#define AP_MPMQ_MAX_SPARE_DAEMONS     9  /* Max # of spare daemons       */
-#define AP_MPMQ_MAX_SPARE_THREADS    10  /* Max # of spare threads       */
-#define AP_MPMQ_MAX_REQUESTS_DAEMON  11  /* Max # of requests per daemon */
-#define AP_MPMQ_MAX_DAEMONS          12  /* Max # of daemons by config   */
-#define AP_MPMQ_MPM_STATE            13  /* starting, running, stopping  */
-#define AP_MPMQ_IS_ASYNC             14  /* MPM can process async connections  */
-#define AP_MPMQ_GENERATION           15  /* MPM generation */
-#define AP_MPMQ_HAS_SERF             16  /* MPM can drive serf internally  */
+/** @defgroup qcodes Query codes for ap_mpm_query()
+ *  @ingroup mpmq
+ *  @{
+ */
+/** Max # of daemons used so far */
+#define AP_MPMQ_MAX_DAEMON_USED       1
+/** MPM can do threading         */
+#define AP_MPMQ_IS_THREADED           2
+/** MPM can do forking           */
+#define AP_MPMQ_IS_FORKED             3
+/** The compiled max # daemons   */
+#define AP_MPMQ_HARD_LIMIT_DAEMONS    4
+/** The compiled max # threads   */
+#define AP_MPMQ_HARD_LIMIT_THREADS    5
+/** \# of threads/child by config */
+#define AP_MPMQ_MAX_THREADS           6
+/** Min # of spare daemons       */
+#define AP_MPMQ_MIN_SPARE_DAEMONS     7
+/** Min # of spare threads       */
+#define AP_MPMQ_MIN_SPARE_THREADS     8
+/** Max # of spare daemons       */
+#define AP_MPMQ_MAX_SPARE_DAEMONS     9
+/** Max # of spare threads       */
+#define AP_MPMQ_MAX_SPARE_THREADS    10
+/** Max # of requests per daemon */
+#define AP_MPMQ_MAX_REQUESTS_DAEMON  11
+/** Max # of daemons by config   */
+#define AP_MPMQ_MAX_DAEMONS          12
+/** starting, running, stopping  */
+#define AP_MPMQ_MPM_STATE            13
+/** MPM can process async connections  */
+#define AP_MPMQ_IS_ASYNC             14
+/** MPM generation */
+#define AP_MPMQ_GENERATION           15
+/** MPM can drive serf internally  */
+#define AP_MPMQ_HAS_SERF             16
+/** @} */
 
 /**
  * Query a property of the current MPM.
- * @param query_code One of APM_MPMQ_*
+ * @param query_code One of AP_MPMQ_*
  * @param result A location to place the result of the query
  * @return APR_EGENERAL if an mpm-query hook has not been registered;
  * APR_SUCCESS or APR_ENOTIMPL otherwise
@@ -159,6 +193,7 @@ AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
  */
 AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result);
 
+/** @} */
 
 typedef void (ap_mpm_callback_fn_t)(void *baton);
 
@@ -191,6 +226,7 @@ typedef enum mpm_child_status {
  * scoreboard slot.
  * @param state One of the mpm_child_status values.  Modules should ignore
  * unrecognized values.
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(void,child_status,(server_rec *s, pid_t pid, ap_generation_t gen,
                                    int slot, mpm_child_status state))
@@ -201,6 +237,7 @@ AP_DECLARE_HOOK(void,child_status,(server_rec *s, pid_t pid, ap_generation_t gen
  *
  * @param s The main server_rec.
  * @param gen The server generation which is now completely finished.
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(void,end_generation,(server_rec *s, ap_generation_t gen))
 
@@ -224,6 +261,14 @@ typedef struct ap_exception_info_t {
     pid_t pid;
 } ap_exception_info_t;
 
+/**
+ * Run the fatal_exception hook for each module; this hook is run
+ * from some MPMs in the event of a child process crash, if the
+ * server was built with --enable-exception-hook and the
+ * EnableExceptionHook directive is On.
+ * @param ei information about the exception
+ * @ingroup hooks
+ */
 AP_DECLARE_HOOK(int,fatal_exception,(ap_exception_info_t *ei))
 #endif /*AP_ENABLE_EXCEPTION_HOOK*/
 
index 7af2f99595353c1210a0b2a123047fac8c483922..7588ad149e112c41572c433e27f3ac1a2e720fdc 100644 (file)
@@ -186,6 +186,8 @@ AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
  * Return an array of named regex backreferences
  * @param preg The precompiled regex
  * @param names The array to which the names will be added
+ * @param prefix An optional prefix to add to the returned names.  AP_REG_MATCH
+ * is the recommended prefix.
  * @param upper If non zero, uppercase the names
  */
 AP_DECLARE(int) ap_regname(const ap_regex_t *preg,
index f9c2d774cc6680f62a1575ec4549ec89aada35f3..77657ae4f4bcafa718fb18c1fc5dffe857aed9c0 100644 (file)
@@ -1298,6 +1298,7 @@ AP_CORE_DECLARE(void *) ap_set_config_vectors(server_rec *server,
  * Run the header parser functions for each module
  * @param r The current request
  * @return OK or DECLINED
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,header_parser,(request_rec *r))
 
@@ -1307,6 +1308,7 @@ AP_DECLARE_HOOK(int,header_parser,(request_rec *r))
  * @param plog The logging streams pool
  * @param ptemp The temporary pool
  * @return OK or DECLINED on success anything else is a error
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,
                                 apr_pool_t *ptemp))
@@ -1318,6 +1320,7 @@ AP_DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,
  * @param ptemp The temporary pool
  * @param s the server to operate upon
  * @return OK or DECLINED on success anything else is a error
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,check_config,(apr_pool_t *pconf, apr_pool_t *plog,
                                   apr_pool_t *ptemp, server_rec *s))
@@ -1330,7 +1333,7 @@ AP_DECLARE_HOOK(int,check_config,(apr_pool_t *pconf, apr_pool_t *plog,
  * @note To avoid reordering problems due to different buffering, hook
  *       functions should only apr_file_*() to print to stdout/stderr and
  *       not simple printf()/fprintf().
- *     
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(void,test_config,(apr_pool_t *pconf, server_rec *s))
 
@@ -1341,6 +1344,7 @@ AP_DECLARE_HOOK(void,test_config,(apr_pool_t *pconf, server_rec *s))
  * @param ptemp The temporary pool
  * @param s The list of server_recs
  * @return OK or DECLINED on success anything else is a error
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog,
                                  apr_pool_t *ptemp,server_rec *s))
@@ -1352,6 +1356,7 @@ AP_DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog,
  * @param ptemp The temporary pool
  * @param s The list of server_recs
  * @return OK or DECLINED on success anything else is a error
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog,
                                apr_pool_t *ptemp,server_rec *s))
@@ -1360,6 +1365,7 @@ AP_DECLARE_HOOK(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog,
  * Run the child_init functions for each module
  * @param pchild The child pool
  * @param s The list of server_recs in this server
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
 
@@ -1367,6 +1373,7 @@ AP_DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
  * Run the handler functions for each module
  * @param r The request_rec
  * @remark non-wildcard handlers should HOOK_MIDDLE, wildcard HOOK_LAST
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,handler,(request_rec *r))
 
@@ -1380,6 +1387,7 @@ AP_DECLARE_HOOK(int,handler,(request_rec *r))
  * @param lookup_uri Controls whether the caller actually wants content or not.
  * lookup is set when the quick_handler is called out of
  * ap_sub_req_lookup_uri()
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri))
 
@@ -1387,6 +1395,7 @@ AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri))
  * Retrieve the optional functions for each module.
  * This is run immediately before the server starts. Optional functions should
  * be registered during the hook registration phase.
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))
 
@@ -1403,6 +1412,7 @@ AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))
  *         APR_ENOENT or APR_ENOTDIR if no htaccess file exists,
  *         AP_DECLINED to let later modules do the opening,
  *         any other error code on error.
+ * @ingroup hooks
  */
 AP_DECLARE_HOOK(apr_status_t,open_htaccess,
                 (request_rec *r, const char *dir_name, const char *access_name,
index 3c6fd9d8b58578a6f3d7427e5062b4bbdb40c7dd..5f0566817729ced1529de9e52eaddd67004ee7c2 100644 (file)
@@ -589,7 +589,7 @@ AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eor;
  * @param e The bucket to inspect
  * @return true or false
  */
-#define AP_BUCKET_IS_EOR(e)         (e->type == &ap_bucket_type_eor)
+#define AP_BUCKET_IS_EOR(e)         ((e)->type == &ap_bucket_type_eor)
 
 /**
  * Make the bucket passed in an End Of REQUEST (EOR) bucket
index f5e64cc05baf81844b59525ee3382afaf6c12cb5..fa3be3853fdd105902fe07927b69a6e3f6dffd32 100644 (file)
@@ -2347,7 +2347,7 @@ AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, char *dest);
 
 /**
  * Short function to execute a command and return the first line of
- * output minus \\n. Useful for "obscuring" passwords via exec calls
+ * output minus \\r \\n. Useful for "obscuring" passwords via exec calls
  * @param p the pool to allocate from
  * @param cmd the command to execute
  * @param argv the arguments to pass to the cmd
index 79d58d82637f8abf06f55f49ab584421b02dab50..5ff937b1ab46b8ad56a1c559a60781c0bbda847c 100644 (file)
@@ -373,33 +373,6 @@ static const char *add_redirect_regex(cmd_parms *cmd, void *dirconf,
     return add_redirect_internal(cmd, dirconf, arg1, arg2, arg3, 1);
 }
 
-static const command_rec alias_cmds[] =
-{
-    AP_INIT_TAKE12("Alias", add_alias, NULL, RSRC_CONF | ACCESS_CONF,
-                  "a fakename and a realname, or a realname in a Location"),
-    AP_INIT_TAKE12("ScriptAlias", add_alias, "cgi-script", RSRC_CONF | ACCESS_CONF,
-                  "a fakename and a realname, or a realname in a Location"),
-    AP_INIT_TAKE123("Redirect", add_redirect, (void *) HTTP_MOVED_TEMPORARILY,
-                   OR_FILEINFO,
-                   "an optional status, then document to be redirected and "
-                   "destination URL"),
-    AP_INIT_TAKE2("AliasMatch", add_alias_regex, NULL, RSRC_CONF,
-                  "a regular expression and a filename"),
-    AP_INIT_TAKE2("ScriptAliasMatch", add_alias_regex, "cgi-script", RSRC_CONF,
-                  "a regular expression and a filename"),
-    AP_INIT_TAKE23("RedirectMatch", add_redirect_regex,
-                   (void *) HTTP_MOVED_TEMPORARILY, OR_FILEINFO,
-                   "an optional status, then a regular expression and "
-                   "destination URL"),
-    AP_INIT_TAKE2("RedirectTemp", add_redirect2,
-                  (void *) HTTP_MOVED_TEMPORARILY, OR_FILEINFO,
-                  "a document to be redirected, then the destination URL"),
-    AP_INIT_TAKE2("RedirectPermanent", add_redirect2,
-                  (void *) HTTP_MOVED_PERMANENTLY, OR_FILEINFO,
-                  "a document to be redirected, then the destination URL"),
-    {NULL}
-};
-
 static int alias_matches(const char *uri, const char *alias_fakename)
 {
     const char *aliasp = alias_fakename, *urip = uri;
@@ -705,6 +678,34 @@ static int fixup_redir(request_rec *r)
     return DECLINED;
 }
 
+static const command_rec alias_cmds[] =
+{
+    AP_INIT_TAKE12("Alias", add_alias, NULL, RSRC_CONF | ACCESS_CONF,
+                  "a fakename and a realname, or a realname in a Location"),
+    AP_INIT_TAKE12("ScriptAlias", add_alias, "cgi-script", RSRC_CONF | ACCESS_CONF,
+                  "a fakename and a realname, or a realname in a Location"),
+    AP_INIT_TAKE123("Redirect", add_redirect, (void *) HTTP_MOVED_TEMPORARILY,
+                   OR_FILEINFO,
+                   "an optional status, then document to be redirected and "
+                   "destination URL"),
+    AP_INIT_TAKE2("AliasMatch", add_alias_regex, NULL, RSRC_CONF,
+                  "a regular expression and a filename"),
+    AP_INIT_TAKE2("ScriptAliasMatch", add_alias_regex, "cgi-script", RSRC_CONF,
+                  "a regular expression and a filename"),
+    AP_INIT_TAKE23("RedirectMatch", add_redirect_regex,
+                   (void *) HTTP_MOVED_TEMPORARILY, OR_FILEINFO,
+                   "an optional status, then a regular expression and "
+                   "destination URL"),
+    AP_INIT_TAKE2("RedirectTemp", add_redirect2,
+                  (void *) HTTP_MOVED_TEMPORARILY, OR_FILEINFO,
+                  "a document to be redirected, then the destination URL"),
+    AP_INIT_TAKE2("RedirectPermanent", add_redirect2,
+                  (void *) HTTP_MOVED_PERMANENTLY, OR_FILEINFO,
+                  "a document to be redirected, then the destination URL"),
+    {NULL}
+};
+
+
 static void register_hooks(apr_pool_t *p)
 {
     static const char * const aszSucc[]={ "mod_userdir.c",
index 3ecb3c0e3c4d29661e65faf740499ae9c2f8abf0..b755cd2ed29e0ae0c3b9afcb9b254c5040e65954 100644 (file)
@@ -983,7 +983,7 @@ static int apprentice(server_rec *s, apr_pool_t *p)
 
 #if MIME_MAGIC_DEBUG
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01516)
-                MODNAME ": apprentice conf=%x file=%s m=%s m->next=%s last=%s",
+                MODNAME ": apprentice conf=%pp file=%s m=%s m->next=%s last=%s",
                 conf,
                 conf->magicfile ? conf->magicfile : "NULL",
                 conf->magic ? "set" : "NULL",
@@ -1275,7 +1275,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
 
 #if MIME_MAGIC_DEBUG
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, serv, APLOGNO(01525)
-                MODNAME ": parse line=%d m=%x next=%x cont=%d desc=%s",
+                MODNAME ": parse line=%d m=%pp next=%pp cont=%d desc=%s",
                 lineno, m, m->next, m->cont_level, m->desc);
 #endif /* MIME_MAGIC_DEBUG */
 
@@ -1540,7 +1540,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
 
 #if MIME_MAGIC_DEBUG
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01529)
-                MODNAME ": match conf=%x file=%s m=%s m->next=%s last=%s",
+                MODNAME ": match conf=%pp file=%s m=%s m->next=%s last=%s",
                 conf,
                 conf->magicfile ? conf->magicfile : "NULL",
                 conf->magic ? "set" : "NULL",
@@ -1590,7 +1590,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
 #if MIME_MAGIC_DEBUG
                 rule_counter++;
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01532)
-                        MODNAME ": line=%d mc=%x mc->next=%x cont=%d desc=%s",
+                        MODNAME ": line=%d mc=%pp mc->next=%pp cont=%d desc=%s",
                             m_cont->lineno, m_cont,
                             m_cont->next, m_cont->cont_level,
                             m_cont->desc);
index 09a7d9d9f66a6e272a88e984ed58fe3e938c573b..55252eca4da2566e826b88df27b759e7c790deb7 100644 (file)
@@ -284,10 +284,9 @@ static void *make_cookie_dir(apr_pool_t *p, char *d)
 
     dcfg = (cookie_dir_rec *) apr_pcalloc(p, sizeof(cookie_dir_rec));
     dcfg->cookie_name = COOKIE_NAME;
-    dcfg->cookie_domain = NULL;
     dcfg->style = CT_UNSET;
-    dcfg->enabled = 0;
-    /* calloc'ed to disabled: samesite, is_secure, is_httponly */
+    /* calloc'ed to disabled: enabled, cookie_domain, samesite, is_secure,
+     * is_httponly */
 
     /* In case the user does not use the CookieName directive,
      * we need to compile the regexp for the default cookie name. */
@@ -296,14 +295,6 @@ static void *make_cookie_dir(apr_pool_t *p, char *d)
     return dcfg;
 }
 
-static const char *set_cookie_enable(cmd_parms *cmd, void *mconfig, int arg)
-{
-    cookie_dir_rec *dcfg = mconfig;
-
-    dcfg->enabled = arg;
-    return NULL;
-}
-
 static const char *set_cookie_exp(cmd_parms *parms, void *dummy,
                                   const char *arg)
 {
@@ -480,7 +471,8 @@ static const command_rec cookie_log_cmds[] = {
                   "domain to which this cookie applies"),
     AP_INIT_TAKE1("CookieStyle", set_cookie_style, NULL, OR_FILEINFO,
                   "'Netscape', 'Cookie' (RFC2109), or 'Cookie2' (RFC2965)"),
-    AP_INIT_FLAG("CookieTracking", set_cookie_enable, NULL, OR_FILEINFO,
+    AP_INIT_FLAG("CookieTracking", ap_set_flag_slot,
+                 (void *)APR_OFFSETOF(cookie_dir_rec, enabled), OR_FILEINFO,
                  "whether or not to enable cookies"),
     AP_INIT_TAKE1("CookieName", set_cookie_name, NULL, OR_FILEINFO,
                   "name of the tracking cookie"),
index 202be8d65351751103651569974975078671b305..bc131da0f0f09a49d3ee9938e7a999211ba23069 100644 (file)
@@ -31,9 +31,9 @@ PROXY_DECLARE(int) ap_proxy_is_domainname(struct dirconn_entry *This, apr_pool_t
 PROXY_DECLARE(int) ap_proxy_is_hostname(struct dirconn_entry *This, apr_pool_t *p);
 PROXY_DECLARE(int) ap_proxy_is_word(struct dirconn_entry *This, apr_pool_t *p);
 
-PROXY_DECLARE_DATA extern int proxy_lb_workers;
-PROXY_DECLARE_DATA extern const apr_strmatch_pattern *ap_proxy_strmatch_path;
-PROXY_DECLARE_DATA extern const apr_strmatch_pattern *ap_proxy_strmatch_domain;
+extern PROXY_DECLARE_DATA int proxy_lb_workers;
+extern PROXY_DECLARE_DATA const apr_strmatch_pattern *ap_proxy_strmatch_path;
+extern PROXY_DECLARE_DATA const apr_strmatch_pattern *ap_proxy_strmatch_domain;
 
 /**
  * Register optional functions declared within proxy_util.c.
index 76ca8175398371418b5e0f021daa2abefa275f8a..bd9ae46f034f78239335117343786b4dd599f7ab 100644 (file)
@@ -269,7 +269,7 @@ cmd_modem_standard(cmd_parms *cmd,
     }
 
     if (dcfg->bytes_per_second == 0) {
-        return "mod_diaulup: Unknown Modem Standard specified.";
+        return "mod_dialup: Unknown Modem Standard specified.";
     }
 
     return NULL;
index f0bde6e4b819b61239ad323536f709b6378fb811..c75f58192fb562cebc5d31a6b636537cad3856d5 100644 (file)
@@ -341,8 +341,10 @@ static int log_child(apr_pool_t *p, const char *progname,
                 rc = apr_procattr_child_err_set(procattr, errfile, NULL);
         }
 
-        rc = apr_proc_create(procnew, args[0], (const char * const *)args,
-                             NULL, procattr, p);
+        if (rc == APR_SUCCESS) {
+            rc = apr_proc_create(procnew, args[0], (const char * const *)args,
+                                 NULL, procattr, p);
+        }
 
         if (rc == APR_SUCCESS) {
             apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
index 05d7235da08114ac193685fcbb0a7807826e1721..f4cb6e027e2a78e4348a50ce2e4309336cdd1ffd 100644 (file)
@@ -586,10 +586,10 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
             return -1;
         }
 
-        args = malloc((ap_server_conf->process->argc + 1) * sizeof (char*));
+        args = ap_malloc((ap_server_conf->process->argc + 1) * sizeof (char*));
         memcpy(args + 1, ap_server_conf->process->argv + 1,
                (ap_server_conf->process->argc - 1) * sizeof (char*));
-        args[0] = malloc(strlen(cmd) + 1);
+        args[0] = ap_malloc(strlen(cmd) + 1);
         strcpy(args[0], cmd);
         args[ap_server_conf->process->argc] = NULL;
     }
index 13759fa70dabca79821ceb1cc4cd5568b77a9955..74ccda2233011e1b98a52e42722cd253f403287a 100644 (file)
@@ -901,7 +901,7 @@ rrl_done:
         else if (deferred_error == rrl_excesswhitespace)
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03448)
                           "HTTP Request Line; Excess whitespace "
-                          "(disallowed by HttpProtocolOptions Strict");
+                          "(disallowed by HttpProtocolOptions Strict)");
         else if (deferred_error == rrl_trailingtext)
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03449)
                           "HTTP Request Line; Extraneous text found '%.*s' "