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

1902 Commits

Author SHA1 Message Date
Stefan Eissing
6dd14083f7 Post 2.4.58-rc3 tag updates
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/tags/2.4.58-rc3-candidate@1913030 13f79535-47bb-0310-9956-ffa450edef68
2023-10-16 15:05:50 +00:00
Stefan Eissing
0d1d79b020 Merge from trunk:
*) mod_http2: added support for bootstrapping WebSockets via HTTP/2, as
     described in RFC 8441. A new directive 'H2WebSockets on|off' has been
     added. The feature is by default not enabled.
     As also discussed in the manual, this feature should work for setups
     using "ProxyPass backend-url upgrade=websocket" without further changes.
     Special server modules for WebSockets will have to be adapted,
     most likely, as the handling if IO events is different with HTTP/2.
     HTTP/2 WebSockets are supported on platforms with native pipes. This
     excludes Windows.
     New directive `H2ProxyRequests on|off` to enable handling
     of HTTP/2 requests in a forward proxy configuration.
     General forward proxying is enabled via `ProxyRequests`. If the
     HTTP/2 protocol is also enabled for such a server/host, this new
     directive is needed in addition.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1911979 13f79535-47bb-0310-9956-ffa450edef68
2023-08-29 07:23:10 +00:00
Graham Leggett
99ebeeab00 Backport to v2.4:
*) core: Add formats %{z} and %{strftime-format} to ErrorLogFormat, and make
     sure that if the format is configured early enough it applies to every log
     line.  PR 62161.
     trunk patch: https://svn.apache.org/r1908380
                  https://svn.apache.org/r1908383
                  https://svn.apache.org/r1908384
                  https://svn.apache.org/r1908388
                  https://svn.apache.org/r1908389
                  https://svn.apache.org/r1908390
                  https://svn.apache.org/r1908393
                  https://svn.apache.org/r1908394
                  https://svn.apache.org/r1908406
                  https://svn.apache.org/r1908407
                  https://svn.apache.org/r1908556
                  https://svn.apache.org/r1908557
     2.4.x patch: svn merge -c 1908380,1908383-1908384,1908388-1908390,1908393-1908394,1908406-1908407,1908556-1908557 ^/httpd/httpd/trunk .
                  (merge works modulo MMN, or patch/PR below)
                  https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/350.diff
                  https://github.com/apache/httpd/pull/350
     +1: ylavic, rpluem, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1911079 13f79535-47bb-0310-9956-ffa450edef68
2023-07-17 21:16:59 +00:00
Joe Orton
85be535398 Merge r1878890 from trunk:
mod_ldap: Use the LDAP API directly to implement the rebind callback
for modern versions of OpenLDAP, avoiding the overhead of the apr-util
implementation.

* modules/ldap/util_ldap.c:
  Define USE_APR_LDAP_REBIND if a modern version of OpenLDAP is used.
  (uldap_rebind_proc): New function.
  (uldap_rebind_init, uldap_rebind_add): Define, using either the
  callback or the (bad) APR-util versions.
  (uldap_connection_unbind): Clear the rebind pool to remove rebind
  references prior to destroying the LDAP *.
  Omit for !USE_APR_LDAP_REBIND.
  (uldap_connection_init): Use new wrappers, only create the rebind
  pool if USE_APR_LDAP_REBIND.

* include/util_ldap.h: Don't include apr_ldap_rebind.h here.

PR: 64414
Github: closes #124
Reviewed by: jorton, covener, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1910853 13f79535-47bb-0310-9956-ffa450edef68
2023-07-07 12:03:32 +00:00
Eric Covener
0ef0aafaaf publishing release httpd-2.4.57
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1909000 13f79535-47bb-0310-9956-ffa450edef68
2023-04-06 17:38:20 +00:00
Ruediger Pluem
9b8cf1746b Merge r1908341, r1908628, r1908629 from trunk:
Do not double encode encoded slashes

In case that AllowEncodedSlashes is set to NoDecode do not double encode
encoded slashes in the URL sent by the reverse proxy to the backend.

* include/ap_mmn.h: Document the addition of ap_proxy_canonenc_ex to the API.

* modules/proxy/mod_proxy.h: Declare ap_proxy_canonenc_ex and define flag
      values.

* modules/proxy/proxy_util.c: Implement ap_proxy_canonenc_ex by modifying
      ap_proxy_canonenc accordingly and reimplement ap_proxy_canonenc to
      use ap_proxy_canonenc_ex with the appropriate flag.

* modules/http2/mod_proxy_http2.c, modules/proxy/mod_proxy_*.c: Set the
      correct flag based on the AllowEncodedSlashes configuration and use
      ap_proxy_canonenc_ex instead of ap_proxy_canonenc.


* Whitespace fixes. No functional change.

* Fix typo

Reviewed by: rpluem, ylavic, covener

Github: closes #351


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908864 13f79535-47bb-0310-9956-ffa450edef68
2023-03-31 14:33:00 +00:00
Eric Covener
07fa049a0b publishing release httpd-2.4.56
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908159 13f79535-47bb-0310-9956-ffa450edef68
2023-03-07 12:50:52 +00:00
Eric Covener
f0a27f2035 publishing release httpd-2.4.55
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1906739 13f79535-47bb-0310-9956-ffa450edef68
2023-01-17 16:15:56 +00:00
Eric Covener
f34e6c027b Merge r1904518 from trunk:
*) mod_proxy_hcheck: Re-enable workers in standard ERROR state. PR 66302.
     [Alessandro Cavaliere <alessandro.cavalier7 unibo.it>]

+ MMN

Submitted By: jim
Reviewed By: +1: jim, ylavic, icing




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1906496 13f79535-47bb-0310-9956-ffa450edef68
2023-01-09 13:22:44 +00:00
Eric Covener
2929d7dab9 Merge r1727934 from trunk:
exporting mod_http2.h

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

Github: closes #327


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1905606 13f79535-47bb-0310-9956-ffa450edef68
2022-11-29 13:19:07 +00:00
Jim Jagielski
4d37880753 Merge r1822857, r1876815, r1893499, r1900024, r1900152, r1900306, r1900559, r1900564, r1900691, r1900694 from trunk:
* Makefile.in (build/config_vars.out): Rebuild if build/config_vars.sh
  has changed.


sort safe_env_lst 
bz 64371


mod_optional_hook_import: debug message at APLOG_DEBUG level.



  *) de-duplicate ALOGNO from code copy.



ab: apr_base64_encode already NUL-terminate the output.

And returns the length including the trailing \0, so setting it at that
length is off by +1.



* Avoid an overflow on large inputs

PR: 66033


dav_get_liveprop_info() returns a long not an int.

Update the type of global_ns accordingly and update the format specifier when this variable is used in printf like functions.

This also aligns code with dav_core_insert_prop() in modules/dav/main/std_liveprop.c

Length computed by count_string() are accumulated in an apr_size_t, so be more consistent and use this data type also in this function.

Fix some typo

[skip ci]

Fix some typos

[skip ci]
Submitted by: jorton, gbechis, ylavic, icing, ylavic, rpluem, jailletc36, jailletc36, jailletc36, jailletc36
Reviewed by: jailletc36, rpluem, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1903618 13f79535-47bb-0310-9956-ffa450edef68
2022-08-21 20:26:51 +00:00
Stefan Eissing
20ec1cd423 publishing release httpd-2.4.54
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1901750 13f79535-47bb-0310-9956-ffa450edef68
2022-06-08 08:47:50 +00:00
Eric Covener
8c14927162 Merge r1901500 from trunk:
handle large writes in ap_rputs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1901501 13f79535-47bb-0310-9956-ffa450edef68
2022-06-01 12:34:16 +00:00
Stefan Eissing
aa62afbaec publishing release httpd-2.4.53
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898917 13f79535-47bb-0310-9956-ffa450edef68
2022-03-14 09:51:39 +00:00
Ruediger Pluem
2ee9fefa98 Merge r1898771 from trunk:
* Improve detection of _Thread_local

GCC < 4.9 reports __STDC_VERSION__ >= 201112 but does not implement
_Thread_local. Take care of this in the condition.

See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066

Reviewed by: ylavic, covener, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898786 13f79535-47bb-0310-9956-ffa450edef68
2022-03-09 14:04:15 +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
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
Rich Bowen
16b1875c11 Resolves BZ65861 - clarify post_config api doc
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898348 13f79535-47bb-0310-9956-ffa450edef68
2022-02-23 14:39:07 +00:00
Stefan Eissing
f59c8043c4 publishing release httpd-2.4.52
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1896180 13f79535-47bb-0310-9956-ffa450edef68
2021-12-20 09:44:06 +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
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
Stefan Eissing
ae23b720b9 publishing release httpd-2.4.51
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893998 13f79535-47bb-0310-9956-ffa450edef68
2021-10-07 15:22:02 +00:00
Ruediger Pluem
8c9b41ffb3 * Nitpick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893982 13f79535-47bb-0310-9956-ffa450edef68
2021-10-07 12:36:22 +00:00
Yann Ylavic
dc55176ebc Fix ap_mmn.h after r1893977.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893980 13f79535-47bb-0310-9956-ffa450edef68
2021-10-07 12:34:29 +00:00
Yann Ylavic
c3a95d75da Merge r1893971 from trunk:
core: Add ap_unescape_url_ex() for better decoding control, and deprecate
      unused AP_NORMALIZE_DROP_PARAMETERS flag.
 
Submitted by: ylavic
Reviewed by: ylavic, icing, gbechis


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893977 13f79535-47bb-0310-9956-ffa450edef68
2021-10-07 12:27:43 +00:00
Stefan Eissing
5a8d2d13f0 publishing release httpd-2.4.50
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893906 13f79535-47bb-0310-9956-ffa450edef68
2021-10-05 08:15:56 +00:00
Graham Leggett
324c4a2791 Backport:
*) core: Add ap_pre_connection() as a wrapper to ap_run_pre_connection()
   and use it to prevent that failures in running the pre_connection
   hook cause crashes afterwards.
   Trunk version of patch:
      https://svn.apache.org/r1893497
      https://svn.apache.org/r1893507
   Backport version for 2.4.x of patch:
     https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/269.diff
   Can be applied via apply_backport_pr.sh 269.
   +1: rpluem, icing, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893654 13f79535-47bb-0310-9956-ffa450edef68
2021-09-26 14:11:22 +00:00
Stefan Eissing
22382addd1 publishing release httpd-2.4.49
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893373 13f79535-47bb-0310-9956-ffa450edef68
2021-09-16 07:58:22 +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
be99f85dba Merge r1891206, r1891216, r1891284 from trunk:
mod_proxy: Fix possible reuse/merging of Proxy(Pass)Match workers.  PR 65419.

We can't truncate ProxyMatch's worker name/url to the first '$' substitution
without possibly colliding with other workers. This also makes the matching
done at runtime by ap_proxy_strcmp_ematch() completely pointless.

To fix this and still address r1878467 (i.e. make http://host:port$1 a "valid"
URL), we need to remove '$' substitutions from the :port part of the URL only
since it's allowed anywhere else by apr_uri_parse().

So let's strip them before apr_uri_parse() and prepend them back in the path
before apr_uri_unparse() to restore the original URL. Non-matchable workers are
not concerned so ap_proxy_define_worker() is made a local helper (w/o the ap_
prefix) which takes "matchable" as argument and can then be called by both
ap_proxy_define_[match_]worker() functions.


mod_proxy: Follow up to r1891206: fix UDS scheme.


mod_proxy: Avoid confusion of prefix/regex matching workers at loading.  PR 65429.

ap_proxy_get_worker() needs to know whether it should lookup for prefix or
match or both matching workers, depending on the context.

For instance <Proxy[Match]> or ProxyPass[Match] directives need to lookup for
an existing worker with the same type as the directive (*Match or not), because
they will define one with that matching type if none exists.

On the contrary, "ProxySet <url>" at load time or ap_proxy_pre_request() at run
time need to find a worker matching an url whether it's by prefix or by regex.

So this commit adds ap_proxy_get_worker_ex() which takes a bitmask for the
matching type and calls it appropriately where needed.

For consistency, ap_proxy_define_worker_ex() is also added, using the same
bitmask flags, deprecating ap_proxy_define_match_worker().

Follow up to r1891206.


Github: closes #261

Submitted by: ylavic
Reviewed by: ylavic, minfrin, icing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892569 13f79535-47bb-0310-9956-ffa450edef68
2021-08-24 12:44:28 +00:00
Graham Leggett
21ee1a7dbf Backport:
*) back port the add of balancer_manage in mod_proxy_balancer.
     trunk patch: http://svn.apache.org/r1859235
                  http://svn.apache.org/r1887176
                  http://svn.apache.org/r1887359
                  http://svn.apache.org/r1887144
     Backport version for 2.4.x of patch:
          https://people.apache.org/~jfclere/patches/patch.210810.txt
     +1: jfclere, jim, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892522 13f79535-47bb-0310-9956-ffa450edef68
2021-08-22 09:51:33 +00:00
Graham Leggett
c7c1f3905c Backport:
*) mod_dav: Add method_precondition hook. WebDAV extensions define
     conditions that must exist before a WebDAV method can be executed.
     This hook allows a WebDAV extension to verify these preconditions.
     trunk patch: http://svn.apache.org/r1879339
                  http://svn.apache.org/r1879340
     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/httpd-2.4-dav-preconditions1.patch
     +1: minfrin, jim, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892514 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 22:55:47 +00:00
Graham Leggett
532be2d244 Backport:
*) Add hooks deliver_report and gather_reports to mod_dav.h. Allows other
     modules apart from versioning implementations to handle the REPORT method.
     trunk patch: http://svn.apache.org/r1879339
                  http://svn.apache.org/r1879307
     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/httpd-2.4-dav-hooks1.patch
     +1: minfrin, jim, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892513 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 22:52:29 +00:00
Graham Leggett
6f73993e1c Backport:
*) Add dav_get_provider(), dav_open_lockdb(), dav_close_lockdb() and
     dav_get_resource() to mod_dav.h.
     trunk patch: http://svn.apache.org/r1879305
                  http://svn.apache.org/r1879466
     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/httpd-2.4-dav-functions6.patch
     +1: minfrin, jim, ylavic (by inspection)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892512 13f79535-47bb-0310-9956-ffa450edef68
2021-08-21 22:47:34 +00:00
Stefan Eissing
cb5c366792 Merged r1891919 from trunk:
*) core: add hook child_stopping hook that gets called when the MPM is stopping a
     child process. The additional graceful parameter allows registered hooks
     to free resources early during a graceful shutdown.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892167 13f79535-47bb-0310-9956-ffa450edef68
2021-08-10 08:43:11 +00:00
Stefan Eissing
6a5d3e006b Merged /httpd/httpd/trunk:r1879074-1879080,1879094-1879095,1879110-1879112,1879114,1879116-1879117,1879137,1879144-1879145,1879147,1879149,1879235,1879360
back port the mapping=servlet proxy logic.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1892161 13f79535-47bb-0310-9956-ffa450edef68
2021-08-10 08:27:18 +00:00
Graham Leggett
044b45e0da *) back port: Add CPING to health check logic.
Trunk version of patch:
        https://svn.apache.org/r1887415
   Backport version for 2.4.x of patch:
      Trunk version of patch works
      svn merge -c 1887415 ^/httpd/httpd/trunk .
   +1: jfclere, jim, minfrin



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1890947 13f79535-47bb-0310-9956-ffa450edef68
2021-06-21 17:03:35 +00:00
Stefan Eissing
c739eda1b7 Fixed version numbers after revew by cristiophe hawkeye.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1890248 13f79535-47bb-0310-9956-ffa450edef68
2021-05-27 14:10:27 +00:00
Stefan Eissing
ecebcc035c Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]

  *) core, h2: common ap_parse_request_line() and ap_check_request_header()
     code. [Yann Ylavic]

  *) core: Add StrictHostCheck to allow unconfigured hostnames to be
     rejected. [Eric Covener]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1890245 13f79535-47bb-0310-9956-ffa450edef68
2021-05-27 13:08:21 +00:00
Christophe Jaillet
3db24ff775 Post 2.4.48 tag updates
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889976 13f79535-47bb-0310-9956-ffa450edef68
2021-05-17 21:10:19 +00:00
Christophe Jaillet
fd0eff7218 Get ready to tag httpd 2.4.48
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889974 13f79535-47bb-0310-9956-ffa450edef68
2021-05-17 21:10:15 +00:00
Stefan Eissing
c0cff48bcc Merge of [r1886840, r1887085, r1887087, r1887134, r1887151, r1887152,
r1887337, r1887340, r1887342, r1887343, r1887360, r1887364, 
       r1887923, r1887965, r1887993, r1888006, r1888083, r1888084,
       r1888723, r1888724, r1888726, r1888729, r1889788] from trunk:

   *) core/mod_ssl/mod_md:
     - adding new ap_ssl_*() functions for a backward
       compatible replacement of the major optional mod_ssl functions. This
       allows other ssl modules to work without impersonating mod_ssl and
       also allows different ssl modules being active on separate ports.
     - latest mod_md with support for multiple certificates per domain
       and ECDSA certificates. Removed ACMEv1 support.
     - Interworking mod_md and ssl modules changed to exchange PEM strings
       instead of file paths for ACME challenges.
     - core/mod_ssl/mod_md: adding OCSP response provisioning as core feature.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889793 13f79535-47bb-0310-9956-ffa450edef68
2021-05-12 10:14:42 +00:00
Christophe Jaillet
1daf78b05c Post 2.4.47 tag updates
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889092 13f79535-47bb-0310-9956-ffa450edef68
2021-04-22 06:43:50 +00:00
Christophe Jaillet
2adfbc3b60 Get ready to tag httpd 2.4.47
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1889090 13f79535-47bb-0310-9956-ffa450edef68
2021-04-22 06:43:44 +00:00
Christophe Jaillet
8433a9b8c9 Merge r1730128, r1878140, r1878265, r1881736, r1882775, r1883872, r1884509, r1887720 from trunk
*) Easy patches: synch 2.4.x and trunk
         - doxygen: Correct doxygen groupname
         - .gdbinit: align columns
         - .gdbinit: fix indentation
         - mod_dav: Add specific logs for different modes
         - core: ap_pbase64encode(): save double NUL byte allocation and assignment
         - core: ap_pbase64decode(): save double NUL byte allocation and assignment
         - support: Fix a typo in a comment
         - proxy_util.c: Fix leak in error path in the do_malloc case

Submitted by: wrowe, ylavic, ylavic, jorton, rpluem, ylavic, jorton, jorton
Reviewed by: jailletc36, gbechis, ylavic
Backported by: jailletc36

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1888929 13f79535-47bb-0310-9956-ffa450edef68
2021-04-18 19:40:13 +00:00
Yann Ylavic
1d65a704e0 Merge r1879285, r1879322, r1879345, r1879346, r1879465, r1879469, r1879470, r1879488, r1879541, r1879548 from trunk:
"[mod_dav_fs etag handling] should really honor the FileETag setting".
- It now does.
- Add "Digest" to FileETag directive, allowing a strong ETag to be
  generated using a file digest.
- Add ap_make_etag_ex() and ap_set_etag_fd() to allow full control over
  ETag generation.
- Add concept of "binary notes" to request_rec, allowing packed bit flags
  to be added to a request.
- First binary note - AP_REQUEST_STRONG_ETAG - allows modules to force
  the ETag to a strong ETag to comply with RFC requirements, such as those
  mandated by various WebDAV extensions.


Be defensive when the request is missing.


Remove tabs.


Use a dedicated constant for the base64 sha1 length.


Be defensive when calculating the digest. Make sure the offset is initialised
to zero before reading the current offset.


Seek to the start of the file when calculating the ETag.


Add log numbers to util_etag.c.


Add MMAP support to ETag generation.


Use a brigade instead of direct reads, allow APR to handle MMAP.


Bump the logno.


Submitted by: minfrin
Reviewed by: minfrin, jim, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1887384 13f79535-47bb-0310-9956-ffa450edef68
2021-03-09 16:28:23 +00:00
Christophe Jaillet
8a375fcf49 s/2020/2021/
Happy New Year!

(r1885835 on trunk)

[skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885836 13f79535-47bb-0310-9956-ffa450edef68
2021-01-23 07:29:38 +00:00
Graham Leggett
8d5648e4d7 Backport to 2.4:
*) mod_proxy: common spooling code to allow mod_proxy_fgci proxy-sendcl. BZ 57087
     trunk patch: https://svn.apache.org/r1884067
                  https://svn.apache.org/r1884068
                  https://svn.apache.org/r1884069
                  https://svn.apache.org/r1884070
     2.4.x patch: http://people.apache.org/~ylavic/patches/2.4.x-mod_proxy_fcgi-sendcl-5on5.patch
                  https://github.com/apache/httpd/pull/162
     +1: ylavic, covener, minfrin
     ylavic: Long standing BZ (always send Content-Length, according to the CGI
             specs) which is addressed by reusing mod_proxy_http's spooling
             code (moved to proxy_util) in mod_proxy_fcgi. The user still needs
             to SetEnv proxy-sendcl for that (2.4 compat).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885607 13f79535-47bb-0310-9956-ffa450edef68
2021-01-17 16:41:47 +00:00