diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 10:03:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 10:03:17 +0000 |
commit | 69f568eb1183a2a1f5148e6db34a8d42e0e52ff6 (patch) | |
tree | fdeb0b5ff80273f95ce61607fc3613dff0b9a235 /server/util.c | |
parent | Adding upstream version 2.4.57. (diff) | |
download | apache2-3394ab89251a0bfd075429031f1f0f32f51f974e.tar.xz apache2-3394ab89251a0bfd075429031f1f0f32f51f974e.zip |
Adding upstream version 2.4.59.upstream/2.4.59upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'server/util.c')
-rw-r--r-- | server/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/util.c b/server/util.c index 2015e43..45502b8 100644 --- a/server/util.c +++ b/server/util.c @@ -502,6 +502,7 @@ AP_DECLARE(int) ap_normalize_path(char *path, unsigned int flags) int ret = 1; apr_size_t l = 1, w = 1, n; int decode_unreserved = (flags & AP_NORMALIZE_DECODE_UNRESERVED) != 0; + int merge_slashes = (flags & AP_NORMALIZE_MERGE_SLASHES) != 0; if (!IS_SLASH(path[0])) { /* Besides "OPTIONS *", a request-target should start with '/' @@ -546,7 +547,7 @@ AP_DECLARE(int) ap_normalize_path(char *path, unsigned int flags) if (w == 0 || IS_SLASH(path[w - 1])) { /* Collapse ///// sequences to / */ - if ((flags & AP_NORMALIZE_MERGE_SLASHES) && IS_SLASH(path[l])) { + if (merge_slashes && IS_SLASH(path[l])) { do { l++; } while (IS_SLASH(path[l])); @@ -3143,7 +3144,7 @@ AP_DECLARE(apr_status_t) ap_varbuf_regsub(struct ap_varbuf *vb, static const char * const oom_message = "[crit] Memory allocation failed, " "aborting process." APR_EOL_STR; -AP_DECLARE(void) ap_abort_on_oom() +AP_DECLARE(void) ap_abort_on_oom(void) { int written, count = strlen(oom_message); const char *buf = oom_message; |