1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

9203 Commits

Author SHA1 Message Date
Ruediger Pluem
e266bd09c3 Merge r1898735 from trunk:
* Improve the logic flow

Reviewed by: rpluem, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898772 13f79535-47bb-0310-9956-ffa450edef68
2022-03-09 07:41:40 +00:00
Yann Ylavic
943f57b336 mod_sed: use size_t to allow for larger buffer sizes and unsigned arithmetics.
Let's switch to apr_size_t buffers and get rid of the ints.


Merge r1898690 from trunk.
Submitted by: rpluem
Reviewed by: rpluem, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898695 13f79535-47bb-0310-9956-ffa450edef68
2022-03-07 14:52:42 +00:00
Yann Ylavic
1b96582269 mod_lua: Error out if lua_read_body() or lua_write_body() fail.
Otherwise r:requestbody() or r:parsebody() failures might go unnoticed for
the user.


Merge r1898689 from trunk.
Submitted by: rpluem
Reviewed by: rpluem, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898694 13f79535-47bb-0310-9956-ffa450edef68
2022-03-07 14:51:19 +00:00
Yann Ylavic
19aa2d83b3 core: Simpler connection close logic if discarding the request body fails.
If ap_discard_request_body() sets AP_CONN_CLOSE by itself it simplifies and
allows to consolidate end_output_stream() and error_output_stream().


Merge r1898683 from trunk.
Submitted by: ylavic, rpluem
Reviewed by: ylavic, rpluem, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898692 13f79535-47bb-0310-9956-ffa450edef68
2022-03-07 14:46:08 +00:00
Stefan Eissing
f38c5b8229 Merge of 1891019,1891023 from trunk:
*) dbm: Split the loading of a dbm driver from the opening of a dbm file. When
     an attempt to load a dbm driver fails, log clearly which driver triggered
     the error (not "default"), and what the error was.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898590 13f79535-47bb-0310-9956-ffa450edef68
2022-03-04 09:30:28 +00:00
Stefan Eissing
e8813d865d Revert of 1898566, backport of dbm loading, to allow clean apply of proposed patch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898589 13f79535-47bb-0310-9956-ffa450edef68
2022-03-04 09:16:02 +00:00
Stefan Eissing
d05b8b9219 Merge of r1896253,r1897859 from trunk (via PR 288):
*) mod_proxy: Bump shared worker name to 384 chars. PR 53218



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898588 13f79535-47bb-0310-9956-ffa450edef68
2022-03-04 09:06:07 +00:00
Stefan Eissing
55b993c475 merge of 1898146,1898173 from trunk:
*) mod_http2: preserve the port number given in a HTTP/1.1
     request that was Upgraded to HTTP/2. Fixes PR65881.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898586 13f79535-47bb-0310-9956-ffa450edef68
2022-03-04 08:51:47 +00:00
Jim Jagielski
a086e1885f dbm backport approved and merged
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898566 13f79535-47bb-0310-9956-ffa450edef68
2022-03-03 13:30:46 +00:00
Stefan Eissing
06daa68add Merge of r1898127 from trunk:
*) mod_proxy: Use the maxium of front end and backend timeouts instead of the
     minimum when tunneling requests (websockets, CONNECT requests).
     Backend timeouts can be configured more selectively (per worker if needed)
     as front end timeouts and typically the backend timeouts reflect the
     application requirements better.  PR 65886



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898559 13f79535-47bb-0310-9956-ffa450edef68
2022-03-03 09:31:51 +00:00
Yann Ylavic
285b6285e7 ap_regex: Use Thread Local Storage (if efficient) to avoid allocations.
PCRE2 wants an opaque context by providing the API to allocate and free it, so
to minimize these calls we maintain one opaque context per thread (in Thread
Local Storage, TLS) grown as needed, and while at it we do the same for PCRE1
ints vectors. Note that this requires a fast TLS mechanism to be worth it,
which is the case of apr_thread_data_get/set() from/to apr_thread_current()
when APR_HAS_THREAD_LOCAL; otherwise we'll do the allocation and freeing for
each ap_regexec().

The small stack vector is used for PCRE1 && !APR_HAS_THREAD_LOCAL only now.


Follow up to r1897240: APR_HAS_THREAD_LOCAL wants #ifdef instead of #if.


Follow up to r1897240: CHANGES entry.


ap_regex: PCRE needs buffers sized against the number of captures only.

No more (useless), no less (or PCRE will allocate a new buffer by itself to
satisfy the needs), so we should base our buffer size solely on the number
of captures in the regex (determined at compile time from the pattern).

The nmatch provided by the user is used to fill in pmatch only (up to that),
but "our" buffers are sized exactly as needed to avoid oversized allocations
or PCRE allocating by itself.


ap_regex: Follow up to r1897244: Fix pmatch overflow and returned value at limits.

Don't write to pmatch[nlimit:] when ncaps > nmatch, rc should not exceed nmatch
either as before r1897244.


ap_regex: Follow up to r1897240: Fix issues spotted by Rüdiger (thanks!).

#include "apr_thread_proc.h" is enough/needed by util_pcre.c and main.c.
Fix compilation (vector => ovector) for !HAVE_PCRE2 && APR_HAS_THREAD_LOCAL.
Check pcre2_match_data_create() return value for HAVE_PCRE2 && !APR_HAS_THREAD_LOCAL.


ap_regex: Follow up to r1897240: runtime fallback to alloc/free.

Even though APR_HAS_THREAD_LOCAL is compiled in, ap_regexec() might still be
called by non a apr_thread_t thread, let's fall back to alloc/free in this
case too.


ap_regex: Follow up to r1897240: no ap_thread_current() yet.


ap_regex: Follow up to r1897240: cleanups.


ap_regex: Follow up to r1897240: cleanup PCRE2 match data on exit.


ap_regex: Follow up to r1897240: #if APR_HAS_THREAD_LOCAL, not #ifdef.


core: Efficient ap_thread_current() with APR < 1.8.

#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


Follow up to r1897460: APLOGNOs.


Follow up to r1897460: !APR_HAS_THREAD implies no ap_thread_* either.


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.


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.


ap_regex: Follow up to r1897240: Fetch the ovector _after_ the match.

Possibly(?) pcre2_match() can modifiy the given pcre2_match_data and invalidate
the old ovector, be safe and fetch it after.


main: Follow up to r1897240: Fix bad log copypasta.

Don't stderr printf the "stat" and "failed" results from the previous
apr_app_initialize() call for an error in ap_thread_main_create().


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).


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.


core: Follow up to r1897240 & r1897691: Syntax.


Add compiled and loaded PCRE version numbers
to "httpd -V" output and to mod_info page.


Forgotten file needed for r1612934.


Minor mmn bump due to r1612940.


Backports: r1897240, r1897241, r1897242, r1897244, r1897248, r1897250,
           r1897260, r1897261, r1897263, r1897386, r1897459, r1897460,
           r1897461, r1897462, r1897472, r1897543, r1897651, r1897680,
           r1897689, r1897691, r1897692, r1612934, r1612940, r1613189
Submitted by: ylavic, rjung, rjung, rjung
Reviewed by: ylavic, rpluem, covener, steffenal, wrowe
GH: closes #289 (https://github.com/apache/httpd/pull/289)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898467 13f79535-47bb-0310-9956-ffa450edef68
2022-02-28 11:56:43 +00:00
Christophe Jaillet
596dbb26eb Merge r1897325, r1897326, r1897329, r1898255 from trunk
APR and APU must be at least 1.3 to be able to configure and build httpd 2.4.x.
So remove some osbolete #if in the source code.
   - mod_socache_memcache
   - mod_authn_dbd
   - mod_log_config
   - mod_proxy_ftp and proxy-util

Submitted by: jailletc36, jailletc36, jailletc36, jailletc36
Reviewed by: jailletc36, icing, rpluem
Backported by: jailletc36

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898393 13f79535-47bb-0310-9956-ffa450edef68
2022-02-24 20:43:21 +00:00
Christophe Jaillet
4a0e77df1e Merge r1881379, r1892422, r1893011, r1897270, r1897271 from trunk
Easy patches: synch 2.4.x and trunk
   - mod_ssl: Fix a few warnings on 64 bits windows compilation
   - ap_escape_quotes(): Remove unneeded checks to improve performance
   - test/time-sem.c: unlock the accept mutex before exiting (error conditions)
   - mod_ext_filter: Fix a spurious -1 used as a APR_SIZE_T_FMT in an error message
   - mod_sed: fix some format string (s/lld/APR_INT64_T_FMT/)

Submitted by: jailletc36, rpluem, ylavic, jailletc36, jailletc36
Reviewed by: jailletc36, icing, rpluem
Backported by: jailletc36

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898391 13f79535-47bb-0310-9956-ffa450edef68
2022-02-24 20:37:08 +00:00
Stefan Eissing
cfa4eb2fc5 Merge of r1896278 from trunk:
*) mod_tls: Fix a linkage issue with rustls when compiled
     with rust 1.55, 1.56 or 1.57. This prevents the loading
     of the module because of an undefined symbol: fmaf
     See https://github.com/rustls/rustls-ffi/issues/133
     [Christophe Jaillet]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898077 13f79535-47bb-0310-9956-ffa450edef68
2022-02-14 16:52:26 +00:00
Ruediger Pluem
3ec324f9ff Merge r1897182, r1897614, r1897615, r1897619 from trunk:
* Allocate the dav_liveprop_elem structure only once in the lifetime of the
  resource->pool and reuse it to avoid unnecessary huge memory allocations
  during collection walks.


* CHANGES entry for r1897182

* Fix typo

* Stupid mine. Evgeny is a committer here

Reviewed by: rpluem, jorton, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1897901 13f79535-47bb-0310-9956-ffa450edef68
2022-02-09 12:29:13 +00:00
Stefan Eissing
960d719aa3 * mod_md) do not interfere with requests to /.well-known/acme-challenge/
resources if challenge type 'http-01' is not configured for a domain.
    Fixes <https://github.com/icing/mod_md/issues/279>.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1897865 13f79535-47bb-0310-9956-ffa450edef68
2022-02-08 12:28:37 +00:00
Stefan Eissing
a7cefc5cf9 *) mod_md: the status description in MDomain's JSON, exposed in the
md-status handler (if configure) did sometimes not carry the correct
     message when certificates needed renew.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1897849 13f79535-47bb-0310-9956-ffa450edef68
2022-02-08 10:00:21 +00:00
Christophe Jaillet
a47d07ec4a Fix some typo.
Add some missing spaces spotted here and there to better comply with coding style.

mod_md is CTR.
r1896409 on trunk

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896410 13f79535-47bb-0310-9956-ffa450edef68
2021-12-26 09:59:00 +00:00
Christophe Jaillet
e0dd1f000c Backport CTR changes for mod_tls and /test/*
This is only typo fixes.

r1896386 + r1896393 in trunk

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896395 13f79535-47bb-0310-9956-ffa450edef68
2021-12-25 19:14:30 +00:00
Stefan Eissing
a0521d289a Merge of r1895981,r1895986 from trunk:
*) mod_proxy: Don't prevent forwarding URIs w/ no hostname.
                (fix for r1895955 already in 2.4.x)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896044 13f79535-47bb-0310-9956-ffa450edef68
2021-12-16 11:23:49 +00:00
Stefan Eissing
07b9768cef Merge r1895970 from trunk:
*) mod_lua: Improve error handling



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896039 13f79535-47bb-0310-9956-ffa450edef68
2021-12-16 11:15:47 +00:00
Yann Ylavic
a962ba7304 Merge r1895914, r1895921 from trunk:
*) http: Enforce that fully qualified uri-paths not to be forward-proxied
     have an http(s) scheme, and that the ones to be forward proxied have a
     hostname, per HTTP specifications.
     trunk patch: http://svn.apache.org/r1895914
                  http://svn.apache.org/r1895921
     2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/286.patch
     backport PR: https://github.com/apache/httpd/pull/286
     +1: ylavic, minfrin, gbechis


mod_proxy: Detect unix: scheme syntax errors at load time.

* modules/proxy/mod_proxy.c(add_pass, add_member, set_proxy_param,
                            proxysection):
  Check return value of ap_proxy_de_socketfy().

* modules/proxy/proxy_util.c(ap_proxy_get_worker_ex):
  Check return value of ap_proxy_de_socketfy().



http: Enforce that fully qualified uri-paths not to be forward-proxied
      have an http(s) scheme, and that the ones to be forward proxied have a
      hostname, per HTTP specifications.

The early checks avoid failing the request later on and thus save cycles
for those invalid cases.


Submitted by: ylavic
Reviewed by: ylavic, minfrin, gbechis
Closes #286


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895955 13f79535-47bb-0310-9956-ffa450edef68
2021-12-14 15:35:56 +00:00
Stefan Eissing
fbda64f2f3 Merge r1889494,r1892563,r1892917 from trunk:
- mod_proxy_balancer: add missing spaces in HTML output
     - mod_proxy_http: Avoid a double call to apr_table_get()
     - mod_ssl: Fix some typo and doxygen issues
     [Jean-Frederic Clere]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895943 13f79535-47bb-0310-9956-ffa450edef68
2021-12-14 09:58:22 +00:00
Graham Leggett
1a4d3c4676 Backport.
*) mod_proxy_connect, mod_proxy: Do not change the status code after we
     already sent it to the client.
     Trunk version of patch:
        https://svn.apache.org/r1895715
     Backport version for 2.4.x of patch:
       https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/283.diff
     Can be applied via apply_backport_pr.sh 283
     +1: rpluem, icing, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895903 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 15:46:50 +00:00
Stefan Eissing
fec401af34 Merge r1895719 from trunk:
*) mod_http: Correctly sent a 100 Continue status code when sending an interim
     response as result of an Expect: 100-Continue in the request and not the
     current status code of the request. PR 65725 [Ruediger Pluem]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895897 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 15:16:55 +00:00
Stefan Eissing
8351a5b322 Merge r1879889,r1879889,r1893644 from trunk:
*) mod_dav: Some DAV extensions, like CalDAV, specify both document
     elements and property elements that need to be taken into account
     when generating a property. The document element and property element
     are made available in the dav_liveprop_elem structure by calling
     dav_get_liveprop_element(). [Graham Leggett]




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895893 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 15:02:44 +00:00
Stefan Eissing
a4b089f26e Merged r1879889,r1893643,r1893644 from trunk:
*) mod_dav: Add utility functions dav_validate_root_ns(),
     dav_find_child_ns(), dav_find_next_ns(), dav_find_attr_ns() and
     dav_find_attr() so that other modules get to play too.
     [Graham Leggett]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895887 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 14:43:38 +00:00
Graham Leggett
c1e16a6671 Backport:
*) mod_http2: fixes PR65731 and https://github.com/icing/mod_h2/issues/212
     trunk patch: na, fixed on 2.4.x source base
     backport PR: https://github.com/apache/httpd/pull/281
     +1: icing, minfrin, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895869 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 10:33:48 +00:00
Graham Leggett
769bc2137a Backport.
*) mod_ssl: Updates to support OpenSSL 3.x
     trunk patch: https://svn.apache.org/r1519264
                  https://svn.apache.org/r1737657
                  https://svn.apache.org/r1876934
                  https://svn.apache.org/r1876936
                  https://svn.apache.org/r1876938
                  https://svn.apache.org/r1890067
                  https://svn.apache.org/r1890076
                  https://svn.apache.org/r1891138
                  https://svn.apache.org/r1893876
                  https://svn.apache.org/r1893964
                  https://svn.apache.org/r1894716
                  https://svn.apache.org/r1895774
     backport PR: https://github.com/apache/httpd/pull/258
     2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/258.patch
                  or https://people.apache.org/~jorton/mod_ssl-openssl3.patch
     +1: jorton, minfrin, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895868 13f79535-47bb-0310-9956-ffa450edef68
2021-12-13 10:27:03 +00:00
Yann Ylavic
9ecde98131 Revert r1895807 [skip ci].
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895808 13f79535-47bb-0310-9956-ffa450edef68
2021-12-11 12:57:53 +00:00
Yann Ylavic
4e5ec8ef75 Vote, promote [skip ci].
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895807 13f79535-47bb-0310-9956-ffa450edef68
2021-12-11 12:56:14 +00:00
Stefan Eissing
056dc00e0e *) mod_tls: added mod_tls from abetterinternet, donated
by ISRG/Prossimo <https://github.com/abetterinternet/mod_tls>.
     - adds font-/backend TLS (v1.2/v1.3) via the Rust rustls crate
       and its rustls-ffi C binding <https://github.com/rustls/rustls-ffi>.
     - documentation at <https://github.com/abetterinternet/mod_tls>
       (adding to Apache's manual TBD)
     - build support for Apache httpd configure on *nix platforms,
       rustls is linked statically into mod_tls.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895766 13f79535-47bb-0310-9956-ffa450edef68
2021-12-10 13:59:10 +00:00
Graham Leggett
c28fdf37f8 Backport:
*) mod_proxy_connect: Honor the smallest of the backend or client timeout
     while tunneling, and handle "proxy-nohalfclose" as opt-out for hlaf-close
     tunneling. PR 65631, 65662, 65689.
     trunk patch: http://svn.apache.org/r1894290
                  http://svn.apache.org/r1895304
     backport PR: https://github.com/apache/httpd/pull/278
     2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/278.patch
     +1: ylavic, rpluem, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895762 13f79535-47bb-0310-9956-ffa450edef68
2021-12-10 13:23:51 +00:00
Stefan Eissing
e924a7c6f8 Merge of 1893969,1894610,1894718,1895285,1895287 from trunk:
*) mod_md: Fix memory leak in case of failures to load the private key.
     PR 65620 [ Filipe Casal <filipe.casal@trailofbits.com> ]
  *) mod_md: adding v2.4.8 with the following changes
    - Added support for ACME External Account Binding (EAB).
      Use the new directive `MDExternalAccountBinding` to provide the
      server with the value for key identifier and hmac as provided by
      your CA.
      While working on some servers, EAB handling is not uniform
      across CAs. First tests with a Sectigo Certificate Manager in
      demo mode are successful. But ZeroSSL, for example, seems to
      regard EAB values as a one-time-use-only thing, which makes them
      fail if you create a seconde account or retry the creation of the
      first account with the same EAB.
    - The directive 'MDCertificateAuthority' now checks if its parameter
      is a http/https url or one of a set of known names. Those are
      'LetsEncrypt', 'LetsEncrypt-Test', 'Buypass' and 'Buypass-Test'
      for now and they are not case-sensitive.
      The default of LetsEncrypt is unchanged.
    - `MDContactEmail` can now be specified inside a `<MDomain dnsname>`
      section.
    - Treating 401 HTTP status codes for orders like 403, since some ACME
      servers seem to prefer that for accessing oders from other accounts.
    - When retrieving certificate chains, try to read the repsonse even
      if the HTTP Content-Type is unrecognized.
    - Fixed a bug that reset the error counter of a certificate renewal
      and prevented the increasing delays in further attempts.
    - Fixed the renewal process giving up every time on an already existing
      order with some invalid domains. Now, if such are seen in a previous
      order, a new order is created for a clean start over again.
      See <https://github.com/icing/mod_md/issues/268>
    - Fixed a mixup in md-status handler when static certificate files
      and renewal was configured at the same time.
  *) mod_md: values for External Account Binding (EAB) can
     now also be configured to be read from a separate JSON
     file. This allows to keep server configuration permissions
     world readable without exposing secrets.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895289 13f79535-47bb-0310-9956-ffa450edef68
2021-11-24 11:07:53 +00:00
Stefan Eissing
8966e290a6 Merge of r1894074 from trunk:
*) mod_proxy_uwsgi: Remove duplicate slashes at the beginning of PATH_INFO.
     PR 65616.  [Ruediger Pluem]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895097 13f79535-47bb-0310-9956-ffa450edef68
2021-11-17 08:42:35 +00:00
Graham Leggett
6e998eb486 Backport:
*) mod_http2: when a server is restarted gracefully, any idle h2 worker
   threads are shut down immediately.
   Also, change OpenSSL API use for deprecations in OpenSSL 3.0.
   Adds all other, never proposed code changes to make a clean
   sync of http2 sources.
   trunk patch: http://svn.apache.org/r1893214
                http://svn.apache.org/r1893215
                http://svn.apache.org/r1893220
                and other never proposed code changes
   PR: https://github.com/apache/httpd/pull/270
   +1: icing, rpluem, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893658 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 14:30:51 +00:00
Graham Leggett
43e01b59a5 Backport:
*) mod_dav: Correctly handle errors returned by dav providers on REPORT
   requests.
   Trunk version of patch:
      https://svn.apache.org/r1893589
   Backport version for 2.4.x of patch:
    Trunk version of patch works
    svn merge -c 1893589 ^/httpd/httpd/trunk .
   +1: rpluem, minfrin, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893656 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 14:18:55 +00:00
Graham Leggett
10b11e3c28 Backport:
*) mod_speling: Backport CheckBasenameMatch for PR44221
   trunk patch: http://svn.apache.org/r1557580
                http://svn.apache.org/r1732273
                http://svn.apache.org/r1844598
   2.4.x patch: full resync of code/docs due to conflicts + changes
                http://people.apache.org/~covener/patches/speling-sync.diff
   +1 covener, rpluem, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893649 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 13:07:01 +00:00
Stefan Eissing
81a8b0133b backport of 1893519,1893532 from trunk:
*) mod_proxy: Handle UDS URIs with empty hostname ("unix:///...") as if they
     had no hostname ("unix:/..."), also in mod_rewrite's is_absolulte_uri().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893559 13f79535-47bb-0310-9956-ffa450edef68
2021-09-23 12:31:53 +00:00
Stefan Eissing
6e768a811c Merge of r1893516 from trunk:
*) mod_rewrite: Fix UDS ("unix:") scheme for [P] rules.  PR 57691 + 65590.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893556 13f79535-47bb-0310-9956-ffa450edef68
2021-09-23 12:29:03 +00:00
Stefan Eissing
2dcc0bb4fe Merge of /httpd/httpd/trunk:r1893399
*) mod_md: when MDMessageCmd for a 'challenge-setup:<type>:<dnsname>'
     fails (!= 0 exit), the renewal process is aborted and an error is
     reported for the MDomain. This provides scripts that distribute
     information in a cluster to abort early with bothering an ACME
     server to validate a dns name that will not work. The common
     retry logic will make another attempt in the future, as with
     other failures.
     Fixed a bug when adding private key specs to an already working
     MDomain, see <https://github.com/icing/mod_md/issues/260>.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893400 13f79535-47bb-0310-9956-ffa450edef68
2021-09-17 12:41:45 +00:00
Stefan Eissing
dedd251e93 Merge of /httpd/httpd/trunk:r1893359
*) mod_md: fixed a bug in handling multiple parallel OCSP requests. These could
     run into an assertion which terminated (and restarted) the child process where
     the task was running. Eventually, all OCSP responses were collected, but not
     in the way that things are supposed to work.
     See also <https://bz.apache.org/bugzilla/show_bug.cgi?id=65567>.
     The bug was possibly triggered when more than one OCSP status needed updating
     at the same time. For example for several renewed certificates after a server
     reload.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893360 13f79535-47bb-0310-9956-ffa450edef68
2021-09-15 13:41:35 +00:00
Stefan Eissing
f9c54948e4 Merge r1890605, r1893164, r1893179 from trunk:
*) core/mod_proxy/mod_ssl:
     Adding `outgoing` flag to conn_rec, indicating a connection is
     initiated by the server to somewhere, in contrast to incoming
     connections from clients.
     Adding 'ap_ssl_bind_outgoing()` function that marks a connection
     as outgoing and is used by mod_proxy instead of the previous
     optional function `ssl_engine_set`. This enables other SSL
     module to secure proxy connections.
     The optional functions `ssl_engine_set`, `ssl_engine_disable` and
     `ssl_proxy_enable` are now provided by the core to have backward
     compatibility with non-httpd modules that might use them. mod_ssl
     itself no longer registers these functions, but keeps them in its
     header for backward compatibility.
     The core provided optional function wrap any registered function
     like it was done for `ssl_is_ssl`.


  *core: clarify comments and use hook API better to check for presence of callbacks.



 * optimizing hook check as suggested by Yann.



Submitted by: icing
Reviewed by: 

Github: closes #203


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893182 13f79535-47bb-0310-9956-ffa450edef68
2021-09-09 15:22:23 +00:00
Yann Ylavic
17a14e5bdb Merge r1893001, r1893002, r1893004 from trunk:
core: Set r->request_time before any logging, mod_unique_id needs it.

* server/protocol.c(read_request_line):
  Move r->request_time initialization before first APLOG_TRACE5,
  ap_log_rerror() may run the generate_log_id hooks and call mod_unique_id
  with no timestamp initialized (zero).
  


mod_unique_id: Follow up to r1892915: Shorter counter race condition yet.

* modules/metadata/mod_unique_id.c(gen_unique_id):
  Set the counter in network byte order for uuencoding only, allowing for
  simple cur_unique_id.counter++



mod_unique_id: Follow up to r1892915 and r1893002: Atomic counter.

* modules/metadata/mod_unique_id.c(gen_unique_id):
  Use an atomic 32bit counter to close the race condition with threaded MPMs,
  using the lower 16 bits for uuencoding still.


Submitted by: ylavic
Reviewed by: ylavic, rpluem, gbechis


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893116 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 08:31:38 +00:00
Yann Ylavic
4c1ed8e820 Merge r1893016 from trunk:
mod_proxy: Don't canonicalize with both nocanon and ProxyPassInterpolateEnv On.

If nocanon is set, we should match the unparsed_uri against the interpolated
alias (not the ProxyPass'ed one) when verifying the resulting length. Otherwise
we falsely restore the canonicalized URL in case of mismatch.  PR 65549.


Submitted by: Joel Self <joelself gmail.com>
Reviewed by: ylavic, covener, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893111 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 08:27:47 +00:00
Yann Ylavic
a67c610394 mod_proxy: Axe unused ap_filter_input_pending in 2.4.x (only) after r1892971.
Submitted by: ylavic
Reviewed by: ylavic, icing,  covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893107 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 08:21:22 +00:00
Ruediger Pluem
d4901cb321 Merge r1892986, r1892987 from trunk:
mod_proxy: Follow up to r1892814.

* modules/proxy/proxy_util.c(fix_uds_filename):
  Sanity checks on the configured UDS path, fail with 500 if invalid since
  continuing through proxy processing wouldn't work as expected.



mod_proxy: Follow up to r1892986: APLOGNO()

Stefan get out of this body! :)


Submitted by: ylavic
Reviewed by: rpluem, ylavic, covener

Github: closes #265


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893101 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 07:00:09 +00:00
Ruediger Pluem
092dfece31 Merge r1869842 from trunk:
mod_ssl: Log private key material to file set by $SSLKEYLOGFILE in the
environment, using the standard format which can be parsed by (e.g.)
wireshark for decoding SSL/TLS traffic; supported from OpenSSL 1.1.1.

* modules/ssl/ssl_private.h: Add keylog_file to SSLModConfigRec.

* modules/ssl/ssl_engine_init.c (ssl_init_Module): Open log file if
  SSLKEYLOGFILE is set in the environment.
  (ssl_init_ctx_protocol): Register the keylog callback with OpenSSL.

* modules/ssl/ssl_engine_kernel.c (modssl_callback_keylog):
  New function.

PR: 63391
Github: closes #74


Submitted by: jorton
Reviewed by: rpluem, ylavic, jorton

Github: closes #264


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893099 13f79535-47bb-0310-9956-ffa450edef68
2021-09-08 06:55:40 +00:00
Yann Ylavic
1e93923874 Merge r1892915 from trunk:
Reduce the time window where duplicates may be generated by mod_uniqueid

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892982 13f79535-47bb-0310-9956-ffa450edef68
2021-09-06 10:53:04 +00:00
Yann Ylavic
123e27c560 Merge r1892914 from trunk:
Revert r1887244 and r1887245 which causes issues on Windows

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892980 13f79535-47bb-0310-9956-ffa450edef68
2021-09-06 10:17:04 +00:00