From: Jim Jagielski Date: Fri, 5 Sep 2014 14:19:29 +0000 (+0000) Subject: Merge r1597642, r1608999, r1605207, r1610366, r1610353, r1611871 from trunk: X-Git-Tag: 2.4.11~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6d3d7c9c8d4dfe56a7f662180bb34110b8a2a29;p=thirdparty%2Fapache%2Fhttpd.git Merge r1597642, r1608999, r1605207, r1610366, r1610353, r1611871 from trunk: 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 --- diff --git a/STATUS b/STATUS index b04955095a2..3dfd976156b 100644 --- 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. diff --git a/modules/arch/netware/mod_nw_ssl.c b/modules/arch/netware/mod_nw_ssl.c index a6e15e7f0c8..cf535d33e27 100644 --- a/modules/arch/netware/mod_nw_ssl.c +++ b/modules/arch/netware/mod_nw_ssl.c @@ -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")) { diff --git a/modules/core/mod_watchdog.h b/modules/core/mod_watchdog.h index 13d23ba9606..8e7112cf918 100644 --- a/modules/core/mod_watchdog.h +++ b/modules/core/mod_watchdog.h @@ -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 */ -/** \@} */ +/** @} */ diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 3d36c77b810..79f83d73f4e 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -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 diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index b331a6c545b..b0c1a9c0ceb 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -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 && diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c index 8e0805f86bd..cf424e6003a 100644 --- a/modules/proxy/mod_proxy_ftp.c +++ b/modules/proxy/mod_proxy_ftp.c @@ -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"); diff --git a/modules/proxy/mod_proxy_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c index a2172fe27e2..c30c4aa73c6 100644 --- a/modules/proxy/mod_proxy_wstunnel.c +++ b/modules/proxy/mod_proxy_wstunnel.c @@ -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; diff --git a/modules/ssl/ssl_engine_vars.c b/modules/ssl/ssl_engine_vars.c index 922bf7c11fc..97ff211d9cb 100644 --- a/modules/ssl/ssl_engine_vars.c +++ b/modules/ssl/ssl_engine_vars.c @@ -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")) { diff --git a/server/util.c b/server/util.c index 2b6030005cc..cd2aa82d371 100644 --- a/server/util.c +++ b/server/util.c @@ -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; } diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 529736ba31f..0c4ba1fd406 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -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); } diff --git a/support/htdigest.c b/support/htdigest.c index f76036d7a5b..972fa82d209 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -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;