]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1597642, r1608999, r1605207, r1610366, r1610353, r1611871 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 5 Sep 2014 14:19:29 +0000 (14:19 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 5 Sep 2014 14:19:29 +0000 (14:19 +0000)
Rename module name in doxygen + partly revert r832442 which skipped doxygen doc generation for 'mod_watchdog.h'

s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles

Use ap_remove_input_filter_byhandle instead of duplicating the code.

Remove some 'register' in variable declaration.

Remove some 'register' in variable declaration.
Save a few cycles by calling 'apr_isalnum' instead of 'apr_isalpha' and 'apr_isdigit'.

Do not use deprecated define.

No change in generated code because MODULE_MAGIC_NUMBER is defined as:
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR
Submitted by: jailletc36
Reviewed/backported by: jim

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

STATUS
modules/arch/netware/mod_nw_ssl.c
modules/core/mod_watchdog.h
modules/generators/mod_autoindex.c
modules/proxy/mod_proxy.c
modules/proxy/mod_proxy_ftp.c
modules/proxy/mod_proxy_wstunnel.c
modules/ssl/ssl_engine_vars.c
server/util.c
server/util_expr_eval.c
support/htdigest.c

diff --git a/STATUS b/STATUS
index b04955095a28893f1b0fa9c9d207282dcb08948f..3dfd976156bdb5a3e04f5f2bee5a96e0c946dcac 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -101,27 +101,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * Easy patches - synch with trunk
-        - mod_watchdog: Rename module name in doxygen + partly revert r832442 which
-                        skipped doxygen doc generation for 'mod_watchdog.h'
-        - mod_proxy: s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles
-        - mod_proxy_wstunnel: Use ap_remove_input_filter_byhandle instead of
-                              duplicating the code.
-        - Remove some 'register' in variable declaration.
-        - core: Remove some 'register' in variable declaration.
-                Save a few cycles by calling 'apr_isalnum' instead of
-                'apr_isalpha' and 'apr_isdigit'.
-        - Do not use deprecated define. s/MODULE_MAGIC_NUMBER/MODULE_MAGIC_NUMBER_MAJOR/
-     trunk patch:
-        http://svn.apache.org/r1597642
-        http://svn.apache.org/r1608999
-        http://svn.apache.org/r1605207
-        http://svn.apache.org/r1610366
-        http://svn.apache.org/r1610353
-        http://svn.apache.org/r1611871
-     2.4.x patch: http://people.apache.org/~jailletc36/backport9.patch
-     +1: jailletc36, ylavic, jim
-
    * Add some missing APLOGNO.
      Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
      Split some lines longer than 80.
index a6e15e7f0c86e8c737b225e1ea7c66e94197ff53..cf535d33e277b8351b620bb5b5f7b8d2f9da58ac 100644 (file)
@@ -1086,7 +1086,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
         else if (strcEQ(var, "SERVER_SOFTWARE"))
             result = ap_get_server_banner();
         else if (strcEQ(var, "API_VERSION")) {
-            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
+            result = apr_itoa(p, MODULE_MAGIC_NUMBER_MAJOR);
             resdup = FALSE;
         }
         else if (strcEQ(var, "TIME_YEAR")) {
index 13d23ba960605bb8bdcfe675a3a70bcffaf6196b..8e7112cf9187a689273344aea0fa77538e709f6d 100644 (file)
@@ -21,9 +21,9 @@
  * @file  mod_watchdog.h
  * @brief Watchdog module for Apache
  *
- * @defgroup MOD_WATCHDOG watchdog
+ * @defgroup MOD_WATCHDOG mod_watchdog
  * @ingroup  APACHE_MODS
- * \@{
+ * @{
  */
 
 #include "httpd.h"
@@ -210,4 +210,4 @@ APR_DECLARE_EXTERNAL_HOOK(ap, AP_WD, int, watchdog_step, (
 #endif
 
 #endif /* MOD_WATCHDOG_H */
-/** \@} */
+/** @} */
index 3d36c77b8107e5f1782306d81f864aeba785133d..79f83d73f4eecfa4d7351f97ae624df20fe1695f 100644 (file)
@@ -1416,7 +1416,7 @@ static char *terminate_description(autoindex_config_rec *d, char *desc,
                                    apr_int32_t autoindex_opts, int desc_width)
 {
     int maxsize = desc_width;
-    register int x;
+    int x;
 
     /*
      * If there's no DescriptionWidth in effect, default to the old
index b331a6c545ba68b21b1dea27c6fdcdaeb8f7ff4b..b0c1a9c0ceb14ff3ef91b58608c7f9cee2a6a08c 100644 (file)
@@ -548,9 +548,9 @@ static const char *proxy_interpolate(request_rec *r, const char *str)
         return str;
     }
     /* OK, this is syntax we want to interpolate.  Is there such a var ? */
-    var = apr_pstrndup(r->pool, start+2, end-(start+2));
+    var = apr_pstrmemdup(r->pool, start+2, end-(start+2));
     val = apr_table_get(r->subprocess_env, var);
-    firstpart = apr_pstrndup(r->pool, str, (start-str));
+    firstpart = apr_pstrmemdup(r->pool, str, (start-str));
 
     if (val == NULL) {
         return apr_pstrcat(r->pool, firstpart,
@@ -1044,7 +1044,7 @@ static int proxy_handler(request_rec *r)
             return HTTP_MOVED_PERMANENTLY;
     }
 
-    scheme = apr_pstrndup(r->pool, uri, p - uri);
+    scheme = apr_pstrmemdup(r->pool, uri, p - uri);
     /* Check URI's destination host against NoProxy hosts */
     /* Bypass ProxyRemote server lookup if configured as NoProxy */
     for (direct_connect = i = 0; i < conf->dirconn->nelts &&
index 8e0805f86bdb59102478ca720ccde77944c346d7..cf424e6003ac550315759559383a5d14abacbf4f 100644 (file)
@@ -447,7 +447,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
     apr_bucket_brigade *out = apr_brigade_create(p, c->bucket_alloc);
     apr_status_t rv;
 
-    register int n;
+    int n;
     char *dir, *path, *reldir, *site, *str, *type;
 
     const char *pwd = apr_table_get(r->notes, "Directory-PWD");
index a2172fe27e2104eb43612ec1740609e6816d85c7..c30c4aa73c68205476f2408985db69190ec9447c 100644 (file)
@@ -141,29 +141,6 @@ static int proxy_wstunnel_transfer(request_rec *r, conn_rec *c_i, conn_rec *c_o,
     return rv;
 }
 
-/* Search thru the input filters and remove the reqtimeout one */
-static void remove_reqtimeout(ap_filter_t *next)
-{
-    ap_filter_t *reqto = NULL;
-    ap_filter_rec_t *filter;
-
-    filter = ap_get_input_filter_handle("reqtimeout");
-    if (!filter) {
-        return;
-    }
-
-    while (next) {
-        if (next->frec == filter) {
-            reqto = next;
-            break;
-        }
-        next = next->next;
-    }
-    if (reqto) {
-        ap_remove_input_filter(reqto);
-    }
-}
-
 /*
  * process the request and write the response.
  */
@@ -236,7 +213,7 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
     pollfd.desc.s = client_socket;
     apr_pollset_add(pollset, &pollfd);
 
-    remove_reqtimeout(c->input_filters);
+    ap_remove_input_filter_byhandle(c->input_filters, "reqtimeout");
 
     r->output_filters = c->output_filters;
     r->proto_output_filters = c->output_filters;
index 922bf7c11fc86742d397b91dc86d7893c6557229..97ff211d9cbfcbc675e97213fccf32950b292e6a 100644 (file)
@@ -261,7 +261,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
         else if (strcEQ(var, "SERVER_SOFTWARE"))
             result = ap_get_server_banner();
         else if (strcEQ(var, "API_VERSION")) {
-            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
+            result = apr_itoa(p, MODULE_MAGIC_NUMBER_MAJOR);
             resdup = FALSE;
         }
         else if (strcEQ(var, "TIME_YEAR")) {
index 2b6030005ccb79ed5353f4b3792528d05e58040c..cd2aa82d3711af305b96156f14926a24fde3de8b 100644 (file)
@@ -252,7 +252,7 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
 
 AP_DECLARE(int) ap_is_matchexp(const char *str)
 {
-    register int x;
+    int x;
 
     for (x = 0; str[x]; x++)
         if ((str[x] == '*') || (str[x] == '?'))
@@ -528,7 +528,7 @@ AP_DECLARE(void) ap_getparents(char *name)
     while (name[l] != '\0') {
         if (name[l] == '.' && name[l + 1] == '.' && IS_SLASH(name[l + 2])
             && (l == 0 || IS_SLASH(name[l - 1]))) {
-            register int m = l + 3, n;
+            int m = l + 3, n;
 
             l = l - 2;
             if (l >= 0) {
@@ -654,7 +654,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s)
 
 AP_DECLARE(int) ap_count_dirs(const char *path)
 {
-    register int x, n;
+    int x, n;
 
     for (x = 0, n = 0; path[x]; x++)
         if (path[x] == '/')
@@ -1585,7 +1585,7 @@ AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *str)
 
 static char x2c(const char *what)
 {
-    register char digit;
+    char digit;
 
 #if !APR_CHARSET_EBCDIC
     digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10
@@ -1617,7 +1617,7 @@ static char x2c(const char *what)
 
 static int unescape_url(char *url, const char *forbid, const char *reserved)
 {
-    register int badesc, badpath;
+    int badesc, badpath;
     char *x, *y;
 
     badesc = 0;
@@ -2100,11 +2100,11 @@ AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *src1,
  */
 AP_DECLARE(int) ap_is_url(const char *u)
 {
-    register int x;
+    int x;
 
     for (x = 0; u[x] != ':'; x++) {
         if ((!u[x]) ||
-            ((!apr_isalpha(u[x])) && (!apr_isdigit(u[x])) &&
+            ((!apr_isalnum(u[x])) &&
              (u[x] != '+') && (u[x] != '-') && (u[x] != '.'))) {
             return 0;
         }
index 529736ba31f4dd4d9d7acbb969b4eee2ce9a121e..0c4ba1fd406de52234d523f5f077adca5e50a4ba 100644 (file)
@@ -1475,7 +1475,7 @@ static const char *misc_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
     case 8:
         return ap_get_server_banner();
     case 9:
-        return apr_itoa(ctx->p, MODULE_MAGIC_NUMBER);
+        return apr_itoa(ctx->p, MODULE_MAGIC_NUMBER_MAJOR);
     default:
         ap_assert(0);
     }
index f76036d7a5bd34e3e583d0f8e6027d2e7fe64482..972fa82d209061992a7359b9538dbbf48fabb3ea 100644 (file)
@@ -92,7 +92,7 @@ static void getword(char *word, char *line, char stop)
 
 static int get_line(char *s, int n, apr_file_t *f)
 {
-    register int i = 0;
+    int i = 0;
     char ch;
     apr_status_t rv = APR_EINVAL;