344 Commits

Author SHA1 Message Date
f2db411286 factor out IS_SLASH, perdir fix
in per-dir, the filename will be internally redirected, so / is OK too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918651 13f79535-47bb-0310-9956-ffa450edef68
2024-06-26 10:09:29 +00:00
4fc2fd7dd5 Make sources build with latest clang version
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909450 13f79535-47bb-0310-9956-ffa450edef68
2023-04-27 07:14:36 +00:00
4cc0da2152 core: Follow up to r1902728 and r1902909: Move comment where relevant.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903522 13f79535-47bb-0310-9956-ffa450edef68
2022-08-18 10:29:05 +00:00
626fc2e079 core: Follow up to r1902728 and r1902906: simplify for APR-1.8+.
apr_threadattr_max_free_set() is now in APR-1.8.x.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902909 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 11:21:30 +00:00
39f34f5abd core: Follow up to r1902728: pools may have no allocator with APR_POOL_DEBUG.
With APR <= 1.7 and APR_POOL_DEBUG, thread's pools don't necessarily have an
allocator, so avoid apr_allocator_max_free_set(NULL) in ap_thread_create() and
ap_thread_main_create().

Also, always create an allocator in ap_thread_current_create().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902906 13f79535-47bb-0310-9956-ffa450edef68
2022-07-21 11:05:12 +00:00
c89c1bf394 util: Follow up to r1902728 and r1902731: static/AP_THREAD_LOCAL order matters.
gcc seems to want "static __thread"  instead of "__thread static"..



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902733 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 11:49:30 +00:00
5382f96a3a core: Apply ap_max_mem_free to created threads' pool allocator.
Since APR does not set the threshold above which the allocator of the thread's
starts returning its memory to the system, so set ap_max_mem_free from
ap_thread_create(), ap_thread_main_create() and ap_thread_current_create().

* include/httpd.h:
  Provide our own ap_thread_create() in any case (but !APR_HAS_THREADS).
  Simplify #ifdef-ery.

* server/util.c(thread_start, ap_thread_main_create, ap_thread_current_create):
  Set ap_max_mem_free to the thread's pool allocator.
  Simplify #ifdef-ery.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902728 13f79535-47bb-0310-9956-ffa450edef68
2022-07-15 09:24:01 +00:00
929c7156ce fix types
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901494 13f79535-47bb-0310-9956-ffa450edef68
2022-06-01 12:20:56 +00:00
e2e1d77917 * Avoid an overflow on large inputs
PR: 66033


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900306 13f79535-47bb-0310-9956-ffa450edef68
2022-04-27 06:35:02 +00:00
e56a83510d *) core: improved checks in ap_escape_quotes() for
extra long strings (or resulting strings) that
     exceed ptrdiff_t ranges.
     [Yann Ylavic, Stefan Eissing]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899905 13f79535-47bb-0310-9956-ffa450edef68
2022-04-16 10:09:59 +00:00
a4ea0e7799 *) core: make ap_escape_quotes() work correctly on strings
with more than MAX_INT/2 characters, counting quotes double.
     Credit to <generalbugs@zippenhop.com> for finding this.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899609 13f79535-47bb-0310-9956-ffa450edef68
2022-04-06 09:17:42 +00:00
6418c66ab6 core: Make sure and check that LimitXMLRequestBody fits in system memory.
LimitXMLRequestBody can not exceed the size needed to ap_escape_html2() the
body without failing to allocate memory, so enforce this at load time based
on APR_SIZE_MAX, and make sure that ap_escape_html2() is within the bounds.

Document the limits for LimitXMLRequestBody in our docs.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898686 13f79535-47bb-0310-9956-ffa450edef68
2022-03-07 13:36:10 +00:00
ba426a5489 core: Follow up to r1897240: Provide/export ap_thread_current_create()
For completness, and possibly to ease backport to 2.4.x for MPM winnt.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897691 13f79535-47bb-0310-9956-ffa450edef68
2022-02-02 10:18:41 +00:00
7833dc9148 core: Follow up to r1897240: Opt-out for AP_HAS_THREAD_LOCAL and/or pcre's usage.
If the compiler's thread_local is not efficient enough on some platforms, or
not desired, have a way to disable its usage in httpd (at compile time).

Handle -DAP_NO_THREAD_LOCAL and/or -DAPREG_NO_THREAD_LOCAL as build opt-out for
thread_local usage in httpd gobally and/or in ap_regex only (respectively).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897689 13f79535-47bb-0310-9956-ffa450edef68
2022-02-02 10:02:26 +00:00
3e0035d189 core: Follow up to r1897460: Provide ap_thread_main_create().
Replace ap_thread_current_create() by ap_thread_main_create() which is how
it's used by httpd. The former is now a local helper only to implement the
latter.

This allows to consolidate/factorize common code in the main() of httpd and
the unix MPMs.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897543 13f79535-47bb-0310-9956-ffa450edef68
2022-01-27 12:34:53 +00:00
aa95fe54f4 core: Follow up to r1897460: Implement and use ap_thread_current_after_fork().
thread_local variables are not (always?) reset on fork(), so we need a way
to set the current_thread to NULL in the child process.

Implement and use ap_thread_current_after_fork() for that.

* include/httpd.h:
  Define ap_thread_current_after_fork().

* server/util.c:
  Implement ap_thread_current_after_fork().

* server/mpm/event/event.c, server/mpm/prefork/prefork.c,
    server/mpm/worker/worker.c:
  Use ap_thread_current_after_fork().

* server/mpm/winnt/child.c:
  Windows processes are not fork()ed and each child runs the main(), so
  ap_thread_current_create() was already called there.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897472 13f79535-47bb-0310-9956-ffa450edef68
2022-01-25 20:28:28 +00:00
15cf51108f Follow up to r1897460: !APR_HAS_THREAD implies no ap_thread_* either.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897462 13f79535-47bb-0310-9956-ffa450edef68
2022-01-25 17:55:16 +00:00
6044859057 core: Efficient ap_thread_current() when apr_thread_local() is missing.
#define ap_thread_create, ap_thread_current_create and ap_thread_current to
their apr-1.8+ equivalent if available, or implement them using the compiler's
thread_local mechanism if available, or finally provide stubs otherwise.

#define AP_HAS_THREAD_LOCAL to 1 in the two former case or 0 otherwise, while
AP_THREAD_LOCAL is defined to the compiler's keyword iff AP_HAS_THREAD_LOCAL.

Replace all apr_thread_create() calls with ap_thread_create() so that httpd
threads can use ap_thread_current()'s pool data as Thread Local Storage.

Bump MMN minor.

* include/httpd.h():
  Define AP_HAS_THREAD_LOCAL, AP_THREAD_LOCAL (eventually), ap_thread_create(),
  ap_thread_current_create() and ap_thread_current().
  
* server/util.c:
  Implement ap_thread_create(), ap_thread_current_create() and
  ap_thread_current() when APR < 1.8.

* modules/core/mod_watchdog.c, modules/http2/h2_workers.c,
    modules/ssl/mod_ssl_ct.c:
  Use ap_thread_create() instead of apr_thread_create.

* server/main.c:
  Use AP_HAS_THREAD_LOCAL and ap_thread_current_create instead of APR's.

* server/util_pcre.c:
  Use AP_HAS_THREAD_LOCAL and ap_thread_current instead of APR's.

* server/mpm/event/event.c, server/mpm/worker/worker.c,
    server/mpm/prefork/prefork.c:
  Use ap_thread_create() instead of apr_thread_create.
  Create an apr_thread_t/ap_thread_current() for the main chaild thread usable
  at child_init().
  
* server/mpm/winnt/child.c:
  Use ap_thread_create() instead of CreateThread().
  Create an apr_thread_t/ap_thread_current() for the main chaild thread usable



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897460 13f79535-47bb-0310-9956-ffa450edef68
2022-01-25 17:34:57 +00:00
cbf06f4893 util: Follow up to r1897101 and r1897105: Yet better ap_cstr_casecmp[n]().
Now with a shorter epilogue.

Dump of assembler code for function ap_cstr_casecmp:
   0x0000000000049fd0 <+0>:	xor    %edx,%edx
   0x0000000000049fd2 <+2>:	lea    0x3d567(%rip),%r8        # 0x87540 <ucharmap>
   0x0000000000049fd9 <+9>:	nopl   0x0(%rax)
   0x0000000000049fe0 <+16>:	movzbl (%rsi,%rdx,1),%eax
   0x0000000000049fe4 <+20>:	movzbl (%r8,%rax,1),%ecx
   0x0000000000049fe9 <+25>:	movzbl (%rdi,%rdx,1),%eax
   0x0000000000049fed <+29>:	add    $0x1,%rdx
   0x0000000000049ff1 <+33>:	movzbl (%r8,%rax,1),%eax
   0x0000000000049ff6 <+38>:	sub    %ecx,%eax
   0x0000000000049ff8 <+40>:	jne    0x49ffe <ap_cstr_casecmp+46>
   0x0000000000049ffa <+42>:	test   %ecx,%ecx
   0x0000000000049ffc <+44>:	jne    0x49fe0 <ap_cstr_casecmp+16>
   0x0000000000049ffe <+46>:	ret    
End of assembler dump.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897106 13f79535-47bb-0310-9956-ffa450edef68
2022-01-16 00:45:34 +00:00
5d65f52a79 util: Follow up to r1897101: Yet better ap_cstr_casecmp[n]().
This ones have a shorter prologue (-O2 still).

Dump of assembler code for function ap_cstr_casecmp:
   0x0000000000049fd0 <+0>:	xor    %edx,%edx
   0x0000000000049fd2 <+2>:	lea    0x3d567(%rip),%r8        # 0x87540 <ucharmap>
   0x0000000000049fd9 <+9>:	nopl   0x0(%rax)
   0x0000000000049fe0 <+16>:	movzbl (%rdi,%rdx,1),%eax
   0x0000000000049fe4 <+20>:	movzbl (%rsi,%rdx,1),%ecx
   0x0000000000049fe8 <+24>:	add    $0x1,%rdx
   0x0000000000049fec <+28>:	movzbl (%r8,%rax,1),%eax
   0x0000000000049ff1 <+33>:	movzbl (%r8,%rcx,1),%ecx
   0x0000000000049ff6 <+38>:	cmp    %ecx,%eax
   0x0000000000049ff8 <+40>:	jne    0x49ffe <ap_cstr_casecmp+46>
   0x0000000000049ffa <+42>:	test   %eax,%eax
   0x0000000000049ffc <+44>:	jne    0x49fe0 <ap_cstr_casecmp+16>
   0x0000000000049ffe <+46>:	sub    %ecx,%eax
   0x000000000004a000 <+48>:	ret    
End of assembler dump.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897105 13f79535-47bb-0310-9956-ffa450edef68
2022-01-16 00:07:45 +00:00
26a499102e util: Improve ap_cstr_casecmp() and ap_cstr_casecmpn() performances.
The new versions [1] compile to a shorter/faster assembly than the previous
ones [2], no functionnal change.

[1] ap_cstr_casecmp() after this commit:
Dump of assembler code for function ap_cstr_casecmp:
   0x0000000000049fc0 <+0>:	movzbl (%rdi),%eax
   0x0000000000049fc3 <+3>:	movzbl (%rsi),%edx
   0x0000000000049fc6 <+6>:	lea    0x3d573(%rip),%r8        # 0x87540 <ucharmap>
   0x0000000000049fcd <+13>:	movzbl (%r8,%rax,1),%eax
   0x0000000000049fd2 <+18>:	movzbl (%r8,%rdx,1),%ecx
   0x0000000000049fd7 <+23>:	cmp    %ecx,%eax
   0x0000000000049fd9 <+25>:	jne    0x49ffe <ap_cstr_casecmp+62>
   0x0000000000049fdb <+27>:	xor    %edx,%edx
   0x0000000000049fdd <+29>:	jmp    0x49ffa <ap_cstr_casecmp+58>
   0x0000000000049fdf <+31>:	nop
   0x0000000000049fe0 <+32>:	add    $0x1,%rdx
   0x0000000000049fe4 <+36>:	movzbl (%rdi,%rdx,1),%eax
   0x0000000000049fe8 <+40>:	movzbl (%rsi,%rdx,1),%ecx
   0x0000000000049fec <+44>:	movzbl (%r8,%rax,1),%eax
   0x0000000000049ff1 <+49>:	movzbl (%r8,%rcx,1),%ecx
   0x0000000000049ff6 <+54>:	cmp    %ecx,%eax
   0x0000000000049ff8 <+56>:	jne    0x49ffe <ap_cstr_casecmp+62>
   0x0000000000049ffa <+58>:	test   %eax,%eax
   0x0000000000049ffc <+60>:	jne    0x49fe0 <ap_cstr_casecmp+32>
   0x0000000000049ffe <+62>:	sub    %ecx,%eax
   0x000000000004a000 <+64>:	ret    
End of assembler dump.

[2] ap_cstr_casecmp() before this commit:
Dump of assembler code for function ap_cstr_casecmp:
   0x000000000004a000 <+0>:	movzbl (%rdi),%eax
   0x000000000004a003 <+3>:	movzbl (%rsi),%edx
   0x000000000004a006 <+6>:	lea    0x3d533(%rip),%r8        # 0x87540 <ucharmap>
   0x000000000004a00d <+13>:	mov    %rdi,%r9
   0x000000000004a010 <+16>:	mov    %rax,%rcx
   0x000000000004a013 <+19>:	movswl (%r8,%rdx,2),%edx
   0x000000000004a018 <+24>:	movswl (%r8,%rax,2),%eax
   0x000000000004a01d <+29>:	sub    %edx,%eax
   0x000000000004a01f <+31>:	jne    0x4a052 <ap_cstr_casecmp+82>
   0x000000000004a021 <+33>:	mov    $0x1,%edx
   0x000000000004a026 <+38>:	test   %ecx,%ecx
   0x000000000004a028 <+40>:	je     0x4a052 <ap_cstr_casecmp+82>
   0x000000000004a02a <+42>:	nopw   0x0(%rax,%rax,1)
   0x000000000004a030 <+48>:	movzbl (%r9,%rdx,1),%eax
   0x000000000004a035 <+53>:	movzbl (%rsi,%rdx,1),%ecx
   0x000000000004a039 <+57>:	add    $0x1,%rdx
   0x000000000004a03d <+61>:	mov    %rax,%rdi
   0x000000000004a040 <+64>:	movswl (%r8,%rcx,2),%ecx
   0x000000000004a045 <+69>:	movswl (%r8,%rax,2),%eax
   0x000000000004a04a <+74>:	sub    %ecx,%eax
   0x000000000004a04c <+76>:	jne    0x4a052 <ap_cstr_casecmp+82>
   0x000000000004a04e <+78>:	test   %edi,%edi
   0x000000000004a050 <+80>:	jne    0x4a030 <ap_cstr_casecmp+48>
   0x000000000004a052 <+82>:	ret    
End of assembler dump.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897101 13f79535-47bb-0310-9956-ffa450edef68
2022-01-15 22:41:05 +00:00
1d45d5527f Revert spurious commit r1895340.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895341 13f79535-47bb-0310-9956-ffa450edef68
2021-11-25 20:47:14 +00:00
5da71e7634 Trigger ci.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895340 13f79535-47bb-0310-9956-ffa450edef68
2021-11-25 20:45:54 +00:00
861c15e03c * Optimize performance by moving calculation of loop invariant out of the loop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894021 13f79535-47bb-0310-9956-ffa450edef68
2021-10-08 09:02:30 +00:00
48b5dfd696 core: Add ap_unescape_url_ex() for better decoding control, and deprecate
unused AP_NORMALIZE_DROP_PARAMETERS flag.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893971 13f79535-47bb-0310-9956-ffa450edef68
2021-10-07 12:00:20 +00:00
e150697086 core: AP_NORMALIZE_DECODE_UNRESERVED should normalize the second encoded dot.
Otherwise ap_normalize_path() can leave some "%2e" encoded.
 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893724 13f79535-47bb-0310-9956-ffa450edef68
2021-09-29 12:35:25 +00:00
8f09caf994 * Remove unneeded checks to improve performance
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892422 13f79535-47bb-0310-9956-ffa450edef68
2021-08-18 14:53:14 +00:00
e0fec7d48d * Follow the same logic that is used for calculating the length
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892418 13f79535-47bb-0310-9956-ffa450edef68
2021-08-18 14:35:41 +00:00
7fb2910feb tolerate apr-1.5
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892207 13f79535-47bb-0310-9956-ffa450edef68
2021-08-11 10:49:56 +00:00
9226cbc6b9 Follow up to 1892038, 1892063.
Improve fix to please a fuzzer which reports:
   util.c:2713:26: runtime error: signed integer overflow:
   9999999999999999 * 1000 cannot be represented in type 'long'

Compute the maximum limit for each case 's', 'h', 'ms' and 'mi' and make sure that the input is below this value.

While at it, move a comment to make things more consistent and use 'apr_time_from_msec() instead of hand writing it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892185 13f79535-47bb-0310-9956-ffa450edef68
2021-08-10 18:49:20 +00:00
30db75534d ap_timeout_parameter_parse: axe unsigned < 0 check
add check to see if the result was smaller than what we started with.
But the operative part is avoiding the UBI


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892063 13f79535-47bb-0310-9956-ffa450edef68
2021-08-07 10:43:06 +00:00
7ea44d0402 fix int overflow in ap_timeout_parameter_parse
signed integer overflow in ap_timeout_parameter_parse under fuzzing 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892038 13f79535-47bb-0310-9956-ffa450edef68
2021-08-06 13:10:45 +00:00
d8bce6f575 fix ap_escape_quotes with pre-escaped quotes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892012 13f79535-47bb-0310-9956-ffa450edef68
2021-08-04 11:48:38 +00:00
6fc9b295a0 ap_pbase64decode(): save double NUL byte allocation and assignment.
apr_base64_decode_len() already accounts for the NUL byte, and
apr_base64_decode() already NUL terminates the string, no need
to do it in ap_pbase64decode().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1883872 13f79535-47bb-0310-9956-ffa450edef68
2020-11-27 17:31:09 +00:00
737cb302c4 * apr_base64_encode_len already includes space for the terminating zero
and apr_base64_encode returns a zero terminated string in encoded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1882775 13f79535-47bb-0310-9956-ffa450edef68
2020-10-23 06:23:03 +00:00
85ab7bcd33 Follow up to r1879075: ap_getparents() to return the empty string above root.
Actually it was its previous behaviour before it was implemented using
ap_normalize_path() in r1879075.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879144 13f79535-47bb-0310-9956-ffa450edef68
2020-06-24 09:21:32 +00:00
4004ce2365 Implement ap_getparent() using ap_normalize_path().
It is functionaly the same as AP_NORMALIZE_ALLOW_RELATIVE flag, while
ap_normalize_path() is more efficient (single pass).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879075 13f79535-47bb-0310-9956-ffa450edef68
2020-06-22 10:30:20 +00:00
4c79fd280d Add ap_normalize_path() to replace ap_getparents() (with options).
include/httpd.h: Declare ap_normalize_path() and flags.
    AP_NORMALIZE_ALLOW_RELATIVE:
        Don't require that the path be absolute as per RFC 7230.
        This is needed for lookup subrequests.
    AP_NORMALIZE_NOT_ABOVE_ROOT:
        Check that directory traversal ("..") don't go above root, or
        initial directory with relative paths.
    AP_NORMALIZE_DECODE_UNRESERVED:
        Decode unreserved characters (like '.') first since they have
        the same semantics encoded and decoded.
    AP_NORMALIZE_MERGE_SLASHES:
        Merge multiple slahes into a single one.
    AP_NORMALIZE_DROP_PARAMETERS:
        Ignore path parameters (";foo=bar"). Not used by httpd but since
        ap_normalize_path() is taken from mod_jk's jk_servlet_normalize()
        it can allow them to use the upstream version now.

server/util.c: Implement ap_normalize_path().

modules/dav/main/util.c: Replace call to ap_getparents() using
    ap_normalize_path() with AP_NORMALIZE_DECODE_UNRESERVED flag since
    the path comes from an obsolute URL (thus potentially %-encoded).
    
modules/generators/mod_autoindex.c: Replace call to ap_getparents() using
    ap_normalize_path() with AP_NORMALIZE_ALLOW_RELATIVE and
    AP_NORMALIZE_NOT_ABOVE_ROOT flags to be consistent with original code.

include/ap_mmn.h: MINOR bump for ap_normalize_path().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879074 13f79535-47bb-0310-9956-ffa450edef68
2020-06-22 10:29:27 +00:00
11d03dc86a core,modules: provide/use ap_parse_strict_length() helper.
It helps simplifying a lot of duplicated code based on apr_strtoff(), while
also rejecting leading plus/minus signs which are dissalowed in Content-Length
and (Content-)Range headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877954 13f79535-47bb-0310-9956-ffa450edef68
2020-05-20 14:01:17 +00:00
c1ac12fa3b factor out TE=chunked checking
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873748 13f79535-47bb-0310-9956-ffa450edef68
2020-02-07 17:14:05 +00:00
da33fd5708 Fix crashes when running with debug APR (APR_POOL_DEBUG),
because all pools have NULL allocators then.

This workaround is probably not very efficient,
but is only used when we do APR_POOL_DEBUG
and efficiency shouldn't be a big concern then.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1863179 13f79535-47bb-0310-9956-ffa450edef68
2019-07-16 20:38:18 +00:00
b6f137d784 * server/util.c: Make "nul" symbol private.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861690 13f79535-47bb-0310-9956-ffa450edef68
2019-06-20 14:47:23 +00:00
5528a9b36f Provide TEST_CHAR marco in test_char.h
For (internal) usage outside server/util.c, mod_log_forensic for now
and mod_cache (T_HTTP_TOKEN_STOP) in a few...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1856490 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 16:24:30 +00:00
cf4dcc9f77 remove null check
fails in maintainer mode w/ __attribute__(nonnull))

util.c:576:10: error: nonnull parameter 'name' will evaluate to 'true'
on first encounter [-Werror,-Wpointer-bool-conversion]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855755 13f79535-47bb-0310-9956-ffa450edef68
2019-03-18 12:25:48 +00:00
c9f3b52c10 * Play safe in case we get no name
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855743 13f79535-47bb-0310-9956-ffa450edef68
2019-03-18 09:19:54 +00:00
680bfc6596 * Revert r1855741 which committed other stuff as well.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855742 13f79535-47bb-0310-9956-ffa450edef68
2019-03-18 09:17:50 +00:00
97752cb849 * Play safe in case we get no name
Reverted by r1855742.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855741 13f79535-47bb-0310-9956-ffa450edef68
2019-03-18 09:16:06 +00:00
807a365d91 Merge consecutive slashes in the URL by default
opt-out w/ `MergeSlashes OFF`.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855705 13f79535-47bb-0310-9956-ffa450edef68
2019-03-17 14:41:10 +00:00
33b2ad9f1c Follow up to r1847430.
- These flags are not for apr_dir_ function. Clarify comment.
- Initialize 'depth', especially when AP_DIR_FLAG_RECURSIVE is explicitelly required.
- Avoid an harmless over-allocation .

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853302 13f79535-47bb-0310-9956-ffa450edef68
2019-02-10 10:14:37 +00:00
b1e34549c1 core: Split out the ability to parse wildcard files and directories
from the Include/IncludeOptional directives into a generic set of
functions ap_dir_nofnmatch() and ap_dir_fnmatch().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1847430 13f79535-47bb-0310-9956-ffa450edef68
2018-11-25 21:15:21 +00:00