]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1486027, r1828909, r1839249, r1842888, r1844343, r1846651 from trunk:
authorJoe Orton <jorton@apache.org>
Tue, 12 Mar 2019 09:29:24 +0000 (09:29 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 12 Mar 2019 09:29:24 +0000 (09:29 +0000)
Clarify the existing behavior.

* modules/generators/mod_info.c: Constify fixed tables and mark
  module-private global variables static. No functional change.

Axe an old and apparently out-dated comment.

There is a typo in the comment.
HN_UPDATE_SEC has been renamed HM_UPDATE_SEC.
The TODO seems to have been taken into account in r759862.

* modules/filters/mod_deflate.c
  (deflate_out_filter): Fix typo setting output note. (Coverity warning)
  (deflate_in_filter): Fix redundant assignment. (clang warning)

* modules/md/md_acme_authz.c (md_acme_authz_update): Fix typo in log
  message.

* modules/dav/main/mod_dav.c (dav_method_propfind): Tag the scratchpool.

Submitted by: minfrin, jorton, jailletc36
Reviewed by: jailletc36, icing, jorton

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

modules/cluster/mod_heartmonitor.c
modules/dav/main/mod_dav.c
modules/dav/main/props.c
modules/filters/mod_deflate.c
modules/generators/mod_info.c
modules/md/md_acme_authz.c

index 965fef5899288e09aec2da2b0dfc2e49797942c0..61a851764d03f3dc3a7cda16097ccec6ef08db43 100644 (file)
@@ -624,9 +624,7 @@ static apr_status_t hm_watchdog_callback(int state, void *data,
             /* store in the slotmem or in the file depending on configuration */
             hm_update_stats(ctx, pool);
             cur = now = apr_time_sec(apr_time_now());
-            /* TODO: Insted HN_UPDATE_SEC use
-             * the ctx->interval
-             */
+
             while ((now - cur) < apr_time_sec(ctx->interval)) {
                 int n;
                 apr_status_t rc;
index 84012f2d7aca3372a6971d480db27978903e5a80..b969465a98be2e6aa73f045ebd55fc42da0093c7 100644 (file)
@@ -2113,6 +2113,7 @@ static int dav_method_propfind(request_rec *r)
     ctx.r = r;
     ctx.bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
     apr_pool_create(&ctx.scratchpool, r->pool);
+    apr_pool_tag(ctx.scratchpool, "mod_dav-scratch");
 
     /* ### should open read-only */
     if ((err = dav_open_lockdb(r, 0, &ctx.w.lockdb)) != NULL) {
index f64878e67fe2710f22ce3271b322a45a974ff224..47cc509bd470c0963138a28da56ca25ac8c656cc 100644 (file)
@@ -1047,6 +1047,10 @@ DAV_DECLARE_NONSTD(void) dav_prop_exec(dav_prop_ctx *ctx)
             /*
             ** Delete the property. Ignore errors -- the property is there, or
             ** we are deleting it for a second time.
+            **
+            ** http://tools.ietf.org/html/rfc4918#section-14.23 says
+            ** "Specifying the removal of a property that does not exist is
+            ** not an error"
             */
             /* ### but what about other errors? */
             (void) (*propdb->db_hooks->remove)(propdb->db, &name);
index d60b2de6f436247bcd15f8a0b54e10290aa1e82f..e714ca68c8e0d5564da0fcba6f23363a8b296b4a 100644 (file)
@@ -866,7 +866,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
 
             if (c->note_output_name) {
                 apr_table_setn(r->notes, c->note_output_name,
-                               (ctx->stream.total_in > 0)
+                               (ctx->stream.total_out > 0)
                                 ? apr_off_t_toa(r->pool,
                                                 ctx->stream.total_out)
                                 : "-");
@@ -1338,8 +1338,6 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
             ctx->stream.next_in = (unsigned char *)data;
             ctx->stream.avail_in = (int)len;
 
-            zRC = Z_OK;
-
             if (!ctx->validation_buffer) {
                 while (ctx->stream.avail_in != 0) {
                     if (ctx->stream.avail_out == 0) {
index e5e63de1378413f2ffa77bd39d3ad79e76f53f12..7876264d41aa1a5767d5ffeffb21182806c637b9 100644 (file)
@@ -80,9 +80,9 @@ typedef struct
 module AP_MODULE_DECLARE_DATA info_module;
 
 /* current file name when doing -DDUMP_CONFIG */
-const char *dump_config_fn_info;
+static const char *dump_config_fn_info;
 /* file handle when doing -DDUMP_CONFIG */
-apr_file_t *out = NULL;
+static apr_file_t *out = NULL;
 
 static void *create_info_config(apr_pool_t * p, server_rec * s)
 {
@@ -297,7 +297,7 @@ typedef struct
     hook_get_t get;
 } hook_lookup_t;
 
-static hook_lookup_t startup_hooks[] = {
+static const hook_lookup_t startup_hooks[] = {
     {"Pre-Config", ap_hook_get_pre_config},
     {"Check Configuration", ap_hook_get_check_config},
     {"Test Configuration", ap_hook_get_test_config},
@@ -311,7 +311,7 @@ static hook_lookup_t startup_hooks[] = {
     {NULL},
 };
 
-static hook_lookup_t request_hooks[] = {
+static const hook_lookup_t request_hooks[] = {
     {"Pre-Connection", ap_hook_get_pre_connection},
     {"Create Connection", ap_hook_get_create_connection},
     {"Process Connection", ap_hook_get_process_connection},
@@ -339,7 +339,7 @@ static hook_lookup_t request_hooks[] = {
     {NULL},
 };
 
-static hook_lookup_t other_hooks[] = {
+static const hook_lookup_t other_hooks[] = {
     {"Monitor", ap_hook_get_monitor},
     {"Child Status", ap_hook_get_child_status},
     {"End Generation", ap_hook_get_end_generation},
@@ -378,7 +378,7 @@ static int module_find_hook(module * modp, hook_get_t hook_get)
 
 static void module_participate(request_rec * r,
                                module * modp,
-                               hook_lookup_t * lookup, int *comma)
+                               const hook_lookup_t *lookup, int *comma)
 {
     if (module_find_hook(modp, lookup->get)) {
         if (*comma) {
index 2b5cbdc5a03c0564bfd74e41a2002cef6a012da1..2295745b7b4b0f1f874a109d6ce7029e6bd891f5 100644 (file)
@@ -239,7 +239,7 @@ apr_status_t md_acme_authz_update(md_acme_authz_t *authz, md_acme_t *acme,
     
     if (md_log_is_level(p, log_level)) {
         md_log_perror(MD_LOG_MARK, log_level, rv, p, "ACME server authz: %s for %s at %s. "
-                      "Exact repsonse was: %s", err? err : "", authz->domain, authz->location,
+                      "Exact response was: %s", err? err : "", authz->domain, authz->location,
                       json? md_json_writep(json, p, MD_JSON_FMT_COMPACT) : "not available");
     }