]> git.ipfire.org Git - thirdparty/apache/httpd.git/log
thirdparty/apache/httpd.git
2 years agoSteal a number
Christophe Jaillet [Sat, 22 Oct 2022 05:02:04 +0000 (05:02 +0000)] 
Steal a number

[skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904770 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) test modules/http1: adding new invalid header values and testing also via h1...
Stefan Eissing [Fri, 21 Oct 2022 07:39:49 +0000 (07:39 +0000)] 
  *) test modules/http1: adding new invalid header values and testing also via h1 proxy.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904756 13f79535-47bb-0310-9956-ffa450edef68

2 years agotests modules/http1: use "Header add" to produce response headers with whitespace.
Stefan Eissing [Wed, 19 Oct 2022 09:16:30 +0000 (09:16 +0000)] 
tests modules/http1: use "Header add" to produce response headers with whitespace.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904693 13f79535-47bb-0310-9956-ffa450edef68

2 years agomod_dav: Follow up to r1904638: Fix duplicated APLOGNO.
Yann Ylavic [Mon, 17 Oct 2022 17:54:01 +0000 (17:54 +0000)] 
mod_dav: Follow up to r1904638: Fix duplicated APLOGNO.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904662 13f79535-47bb-0310-9956-ffa450edef68

2 years agoSteal APLOGNO [skip ci]
Yann Ylavic [Mon, 17 Oct 2022 17:52:47 +0000 (17:52 +0000)] 
Steal APLOGNO [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904661 13f79535-47bb-0310-9956-ffa450edef68

2 years agocatch by CJ
Jim Jagielski [Mon, 17 Oct 2022 11:16:49 +0000 (11:16 +0000)] 
catch by CJ

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904642 13f79535-47bb-0310-9956-ffa450edef68

2 years agomod_dav: Allow to disable lock discovery via an DAVLockDiscovery expression.
Yann Ylavic [Mon, 17 Oct 2022 09:48:11 +0000 (09:48 +0000)] 
mod_dav: Allow to disable lock discovery via an DAVLockDiscovery expression.

mod_dav-fs scales badly when a few clients run PROPFIND requests to discover
directory content. Each PROPFIND involves lockdiscovery, which in turn waits
for a locked access to the file containing the lock database. Performances
quickly drop because of lock contention on this file.

Add a DAVLockDiscovery configuration directive that allows lockdiscovery to be
disabled. Its argument is an Apache expression so that flexible configuration
are possible (per-request).

When lock discovery is disabled, an empty lockdiscovery property is returned on
POPRFIND methods, just like if no lock was set on the object. That should cause
no regression, since a client cannot rely on lockdiscovery to decide when a
file should be accessed, the LOCK methood must be used.

If DAVLockDiscovery is not specified, the behavior is unchanged.

PR 66313.
Submitted by: Emmanuel Dreyfus <manu netbsd.org>
Reviewed by: ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904638 13f79535-47bb-0310-9956-ffa450edef68

2 years agomod_http2: resolving duplicate log tag in #if/#else code copies.
Stefan Eissing [Fri, 14 Oct 2022 12:57:24 +0000 (12:57 +0000)] 
mod_http2: resolving duplicate log tag in #if/#else code copies.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904590 13f79535-47bb-0310-9956-ffa450edef68

2 years agostealing a number [skip ci]
Stefan Eissing [Fri, 14 Oct 2022 12:51:51 +0000 (12:51 +0000)] 
stealing a number [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904589 13f79535-47bb-0310-9956-ffa450edef68

2 years agoaplogno should be called aplogyes
Stefan Eissing [Thu, 13 Oct 2022 07:12:43 +0000 (07:12 +0000)] 
aplogno should be called aplogyes

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904561 13f79535-47bb-0310-9956-ffa450edef68

2 years agostealing another number. [skip ci]
Stefan Eissing [Thu, 13 Oct 2022 07:12:07 +0000 (07:12 +0000)] 
stealing another number. [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904560 13f79535-47bb-0310-9956-ffa450edef68

2 years agoSync with v2.0.10 from github:
Stefan Eissing [Tue, 11 Oct 2022 14:54:08 +0000 (14:54 +0000)] 
Sync with v2.0.10 from github:

 * Extensive testing in production done by Alessandro Bianchi (@alexskynet)
   on the v2.0.x versions for stability. Many thanks!
 * refactored stream response handling to reflect the different phases
   (response/data/trailers) more clearly and help resolving cpu busy loops.
 * Adding more negative tests for handling of errored responses to cover
   edge cases.
 * mod_http2: fixed handling of response where neiter an EOS nor an ERROR was
   received as a cause to reset the stream.
 * mod_proxy_http2: generating error buckets for fault response bodies, to
   signal failure to fron when response header were already sent.

v2.0.9
--------------------------------------------------------------------------------
 * Fixed a bug where errors during reponse body handling did not lead to
   a proper RST_STREAM. Instead processing went into an infinite loop.
   Extended test cases to catch this condition.

v2.0.8
--------------------------------------------------------------------------------
 * Delaying input setup of a stream just before processing starts. This allows
   any EOS indicator arriving from the client before that to take effect.
   Without knowing that a stream has no input, internal processing has to
   simulate chunked encoding. This is not wrong, but somewhat more expensive
   and mod_security has been reported to be allergic to seeing 'chunked'
   on some requests. See <https://bz.apache.org/bugzilla/show_bug.cgi?id=66282>.
 * mod_proxy_http2: fixed #235 by no longer forwarding 'Host:' header when
   request ':authority' is known. Improved test case that did not catch that
   the previous 'fix' was incorrect.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904522 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_proxy_hcheck: Re-enable workers in standard ERROR state. PR 66302.
Jim Jagielski [Tue, 11 Oct 2022 13:20:11 +0000 (13:20 +0000)] 
  *) mod_proxy_hcheck: Re-enable workers in standard ERROR state. PR 66302.
     [Alessandro Cavaliere <alessandro.cavalier7 unibo.it>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904518 13f79535-47bb-0310-9956-ffa450edef68

2 years agoRemove trailing whitespace
Jim Jagielski [Tue, 11 Oct 2022 13:16:41 +0000 (13:16 +0000)] 
Remove trailing whitespace

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904517 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_proxy_hcheck: Detect AJP/CPING support correctly. PR 66300.
Jim Jagielski [Tue, 11 Oct 2022 13:15:24 +0000 (13:15 +0000)] 
  *) mod_proxy_hcheck: Detect AJP/CPING support correctly. PR 66300.
     [Alessandro Cavaliere <alessandro.cavalier7 unibo.it>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904516 13f79535-47bb-0310-9956-ffa450edef68

2 years agomod_proxy: Ignore (and warn about) enablereuse=on for ProxyPassMatch when
Yann Ylavic [Tue, 11 Oct 2022 09:53:04 +0000 (09:53 +0000)] 
mod_proxy: Ignore (and warn about) enablereuse=on for ProxyPassMatch when
           some dollar substitution (backreference) happens in the hostname
           or port part of the URL.

Address or connection reuse can't work when the autority part of the URL is
dynamic (single origin server[:port] handled/assumed in the reslist). Detect
such cases and unset worker->s->is_address_reusable to disable reuse regardless
of enablereuse/disablereuse.

* modules/proxy/proxy_util.c(ap_proxy_define_worker_ex):
  Lookup for $n substitution in the hostname[:port] when parsing the URL and
  if present, set worker->->is_address_reusable=0 / worker->s->disablereuse=1.

* modules/proxy/proxy_util.c(ap_proxy_initialize_worker):
  Don't overwrite worker->s->is_address_reusable from enablereuse/disablereuse
  parameters, and set both consistently.

* docs/manual/mod/mod_proxy.xml:
  Add ProxyPassMatch compatibility note about key=value parameters handled with
  $n substitutions since 2.4.47.
  Document the specificities of enablereuse/disablereuse w.r.t. $n subsitutions
  in the different part of the URL.
  Axe the note about unparsable URLs when the $n substitution happens in the
  port, this has been addressed in 2.4.47 too (and works now).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904513 13f79535-47bb-0310-9956-ffa450edef68

2 years agoSteal a number for next commit. [skip ci]
Yann Ylavic [Tue, 11 Oct 2022 08:41:44 +0000 (08:41 +0000)] 
Steal a number for next commit. [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904511 13f79535-47bb-0310-9956-ffa450edef68

2 years agoResolving a duplicate log tag after ressurecting h2_headers.c for 2.4.x compat.
Stefan Eissing [Thu, 6 Oct 2022 11:23:46 +0000 (11:23 +0000)] 
Resolving a duplicate log tag after ressurecting h2_headers.c for 2.4.x compat.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904424 13f79535-47bb-0310-9956-ffa450edef68

2 years agosteal a number [skip ci]
Stefan Eissing [Thu, 6 Oct 2022 11:13:58 +0000 (11:13 +0000)] 
steal a number [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904423 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc rebuild.
Lucien Gentis [Sat, 1 Oct 2022 12:33:34 +0000 (12:33 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904359 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc XML file update.
Lucien Gentis [Sat, 1 Oct 2022 12:32:34 +0000 (12:32 +0000)] 
fr doc XML file update.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904358 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: synchronization with github sources.
Stefan Eissing [Tue, 27 Sep 2022 13:21:21 +0000 (13:21 +0000)] 
  *) mod_http2: synchronization with github sources.
     Building in trunk and against 2.4.x is now supported
     via AP_HAS_RESPONSE_BUCKETS defines.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904305 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: use proper apr_time_t where it is due, no (int) casting.
Stefan Eissing [Tue, 27 Sep 2022 11:00:10 +0000 (11:00 +0000)] 
  *) mod_http2: use proper apr_time_t where it is due, no (int) casting.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904299 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: type adjustments and castings for int/apr_uint32_t/apr_size_t/apr_off_t.
Stefan Eissing [Tue, 27 Sep 2022 10:53:51 +0000 (10:53 +0000)] 
  *) mod_http2: type adjustments and castings for int/apr_uint32_t/apr_size_t/apr_off_t.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904297 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: documentation clarification on dependency of H2HeaderStrictness on
Stefan Eissing [Mon, 26 Sep 2022 13:33:23 +0000 (13:33 +0000)] 
  *) mod_http2: documentation clarification on dependency of H2HeaderStrictness on
     the underlying nghttp2 version in play.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904273 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: documentation update on values for H2HeaderStrictness.
Stefan Eissing [Mon, 26 Sep 2022 13:28:18 +0000 (13:28 +0000)] 
  *) mod_http2: documentation update on values for H2HeaderStrictness.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904272 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: new directive "H2HeaderStrictness" to control the compliance
Stefan Eissing [Mon, 26 Sep 2022 12:29:47 +0000 (12:29 +0000)] 
  *) mod_http2: new directive "H2HeaderStrictness" to control the compliance
     level of header checks as defined in the HTTP/2 RFCs. Default is 7540.
     9113 activates the checks for forbidden leading/trailing whitespace in
     field values (available from nghttp2 v1.50.0 on).

   - source sync with github version
   - fix for keepalive idle wait in mpm_worker setup
   - ensuring EOS when secondary connection has been handled
   - fixed race in late input EOS arrival when stream was
     already scheduled for execution.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904269 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_http2: removing bucket splitting into an extra recv brigade.
Stefan Eissing [Wed, 21 Sep 2022 11:23:24 +0000 (11:23 +0000)] 
  *) mod_http2: removing bucket splitting into an extra recv brigade.
     buckets are always received as a whole now, even if the total size
     exceeds the receivers specified length. This simplifies the internal
     handling and, since these buckets already exist, lead to less memory
     consumption overall.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904189 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) tests: load the top-level mod_aptest in all test suites.
Stefan Eissing [Wed, 21 Sep 2022 11:03:44 +0000 (11:03 +0000)] 
  *) tests: load the top-level mod_aptest in all test suites.
     - aptest logs the test name from the header 'AP-Test-Name' with
       the request line. LogLevel aptest:info is switched on.
     - pytest sets 'AP-Test-Name' for all curl/nghttp invocation
       against the server.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904188 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) mod_proxy_http2: use only the ':authority' header to forward 'Host'
Stefan Eissing [Tue, 20 Sep 2022 12:40:58 +0000 (12:40 +0000)] 
  *) mod_proxy_http2: use only the ':authority' header to forward 'Host'
     information to a backend. Deduce ':authority' from what the client
     sent when 'ProxyPreserveHost' is on.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904164 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc rebuild.
Lucien Gentis [Sat, 10 Sep 2022 16:20:40 +0000 (16:20 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903979 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc XML file update.
Lucien Gentis [Sat, 10 Sep 2022 16:19:16 +0000 (16:19 +0000)] 
fr doc XML file update.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903978 13f79535-47bb-0310-9956-ffa450edef68

2 years ago *) test mod_md: disabling test holding file lock as this fails in our CI
Stefan Eissing [Sat, 10 Sep 2022 08:15:49 +0000 (08:15 +0000)] 
  *) test mod_md: disabling test holding file lock as this fails in our CI

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903959 13f79535-47bb-0310-9956-ffa450edef68

2 years agoFix a doc build issue introduced in r1903933.
Christophe Jaillet [Fri, 9 Sep 2022 16:23:13 +0000 (16:23 +0000)] 
Fix a doc build issue introduced in r1903933.

For an unknown reason, build worked like a charm yesterday, but not today :(

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903946 13f79535-47bb-0310-9956-ffa450edef68

2 years agoFix a strange link in the French Doc.
Christophe Jaillet [Fri, 9 Sep 2022 16:14:12 +0000 (16:14 +0000)] 
Fix a strange link in the French Doc.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903942 13f79535-47bb-0310-9956-ffa450edef68

2 years agoAdd some syntax highlight to some directive usage examples.
Christophe Jaillet [Thu, 8 Sep 2022 19:20:17 +0000 (19:20 +0000)] 
Add some syntax highlight to some directive usage examples.

Fix a small style issue.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903933 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc rebuild.
Lucien Gentis [Sat, 3 Sep 2022 13:48:28 +0000 (13:48 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903845 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc XML files updates.
Lucien Gentis [Sat, 3 Sep 2022 13:47:01 +0000 (13:47 +0000)] 
fr doc XML files updates.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903844 13f79535-47bb-0310-9956-ffa450edef68

2 years agoemphasize a few things about authz_host
Eric Covener [Fri, 2 Sep 2022 23:17:14 +0000 (23:17 +0000)] 
emphasize a few things about authz_host

- "domain name" is not a good contrast for hostname unqualified, use "partial" as used earlier in the doc
- mention that DNS resolution [of the require line arguments] is done at runtime not startup. This may be
  obvious to developers when you see it uses an ap_expr but the question was specifically asked on IRC.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903838 13f79535-47bb-0310-9956-ffa450edef68

2 years agoxforms
Jim Jagielski [Mon, 29 Aug 2022 17:41:01 +0000 (17:41 +0000)] 
xforms

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903758 13f79535-47bb-0310-9956-ffa450edef68

2 years agoDocument hcmethod enhancement to allow HTTP/1.1 comms
Jim Jagielski [Sun, 28 Aug 2022 20:07:35 +0000 (20:07 +0000)] 
Document hcmethod enhancement to allow HTTP/1.1 comms

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903745 13f79535-47bb-0310-9956-ffa450edef68

2 years agoAllow for HTTP/1.1 or HTTP/1.0 protocol health checks
Jim Jagielski [Sun, 28 Aug 2022 18:46:21 +0000 (18:46 +0000)] 
Allow for HTTP/1.1 or HTTP/1.0 protocol health checks

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903744 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc rebuild.
Lucien Gentis [Sat, 27 Aug 2022 14:11:38 +0000 (14:11 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903707 13f79535-47bb-0310-9956-ffa450edef68

2 years agofr doc XML files updates.
Lucien Gentis [Sat, 27 Aug 2022 14:10:31 +0000 (14:10 +0000)] 
fr doc XML files updates.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903706 13f79535-47bb-0310-9956-ffa450edef68

2 years ago* Use apr_size_t instead of int to harden against overflows.
Ruediger Pluem [Thu, 25 Aug 2022 15:57:59 +0000 (15:57 +0000)] 
* Use apr_size_t instead of int to harden against overflows.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903680 13f79535-47bb-0310-9956-ffa450edef68

2 years agomod_md v2.4.19 from github sync
Stefan Eissing [Thu, 25 Aug 2022 14:00:13 +0000 (14:00 +0000)] 
mod_md v2.4.19 from github sync

  *) mod_md: a new directive `MDStoreLocks` can be used on cluster
     setups with a shared file system for `MDStoreDir` to order
     activation of renewed certificates when several cluster nodes are
     restarted at the same time. Store locks are not enabled by default.

     Restored curl_easy cleanup behaviour from v2.4.14 and refactored
     the use of curl_multi for OCSP requests to work with that.
     Fixes <https://github.com/icing/mod_md/issues/293>.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903677 13f79535-47bb-0310-9956-ffa450edef68

2 years agoStole a new number.
Stefan Eissing [Thu, 25 Aug 2022 13:28:19 +0000 (13:28 +0000)] 
Stole a new number.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903676 13f79535-47bb-0310-9956-ffa450edef68

2 years agocore: Follow up to r1902728: ap_max_mem_free early setting.
Yann Ylavic [Thu, 18 Aug 2022 10:44:52 +0000 (10:44 +0000)] 
core: Follow up to r1902728: ap_max_mem_free early setting.

Set ap_max_mem_free at static initialization time so that the main thread,
created early from init_process(), has some (default) limits for its pool.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903523 13f79535-47bb-0310-9956-ffa450edef68

2 years agocore: Follow up to r1902728 and r1902909: Move comment where relevant.
Yann Ylavic [Thu, 18 Aug 2022 10:29:05 +0000 (10:29 +0000)] 
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

2 years ago* http2_get_num_workers is not deprecated.
Ruediger Pluem [Wed, 17 Aug 2022 08:00:36 +0000 (08:00 +0000)] 
* http2_get_num_workers is not deprecated.
  Hence move it out of the deprecation section

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903478 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) mod_ssl: when a proxy connection had handled a request using SSL, an
Stefan Eissing [Mon, 1 Aug 2022 12:56:11 +0000 (12:56 +0000)] 
  *) mod_ssl: when a proxy connection had handled a request using SSL, an
     error was logged when "SSLProxyEngine" was only configured in the
     location/proxy section and not the overall server. The connection
     continued to work, the error log was in error. Fixed PR66190.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1903167 13f79535-47bb-0310-9956-ffa450edef68

3 years agocore: Follow up to r1902728 and r1902906: simplify for APR-1.8+.
Yann Ylavic [Thu, 21 Jul 2022 11:21:30 +0000 (11:21 +0000)] 
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

3 years agocore: Follow up to r1902728: pools may have no allocator with APR_POOL_DEBUG.
Yann Ylavic [Thu, 21 Jul 2022 11:05:12 +0000 (11:05 +0000)] 
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

3 years agoutil_cpre: Follow up to r1902731: Simplify thread pool allocation.
Yann Ylavic [Tue, 19 Jul 2022 16:18:03 +0000 (16:18 +0000)] 
util_cpre: Follow up to r1902731: Simplify thread pool allocation.

We don't need to over-allocate pool/heap buffers and handle the (used) size,
let apr_palloc() do this exact work for us.

That way we only need an AP_THREAD_LOCAL pool with no buffer tracking, simpler.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902858 13f79535-47bb-0310-9956-ffa450edef68

3 years agoutil: Follow up to r1902728 and r1902731: static/AP_THREAD_LOCAL order matters.
Yann Ylavic [Fri, 15 Jul 2022 11:49:30 +0000 (11:49 +0000)] 
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

3 years agoutil_pcre: Restore nmatch < ncaps behaviour with PCRE1 (only).
Yann Ylavic [Fri, 15 Jul 2022 10:46:37 +0000 (10:46 +0000)] 
util_pcre: Restore nmatch < ncaps behaviour with PCRE1 (only).

When the requested nmatch is below the number of captures for the regex (i.e.
nmatch is zero if the user does not care about the captures), with PCRE1 we can
pass a smaller ovector to pcre_exec() (or even NULL) which allows for somes
optimizations (less or even no recursion) internally in pcre.

This might avoid crashes due to stack usage/exhaustion with pathological
patterns (see BZ 66119).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902732 13f79535-47bb-0310-9956-ffa450edef68

3 years agoutil_pcre: Add a thread local subpool cache for when stack does not suffice.
Yann Ylavic [Fri, 15 Jul 2022 10:36:24 +0000 (10:36 +0000)] 
util_pcre: Add a thread local subpool cache for when stack does not suffice.

When AP_HAS_THREAD_LOCAL is available, use a thread-local match_thread_state to
save per-thread data in a subpool of the thread's pool.

If private_malloc() gets out of the stack buffer and the current thread has a
pool (i.e. ap_thread_current() != NULL), it will apr_palloc()ate and return
memory from the subpool.

When the match is complete and the match_data are freed, the thread subpool is
cleared thus giving back the memory to the allocator, which itself will give
back the memory or recycle it depending on its max_free setting.

* util_pcre.c:
  Restore POSIX_MALLOC_THRESHOLDsince this is part of the user API.

* util_pcre.c(match_data_pt):
  Type not used (explicitely) anymore, axe.

* util_pcre.c(struct match_data_state):
  Put the stack buffer there to simplify code (the state is allocated on
  stack anyway).
  If APREG_USE_THREAD_LOCAL, add the apr_thread_t* and match_thread_state*
  fields that track the thread local data for the match.

* util_pcre.c(alloc_match_data, free_match):
  Renamed to setup_state() and cleanup_state(), simplified (no stack buffer
  parameters anymore).
  cleanup_state() now clears the thread local subpool if used during the match.
  setup_state() set state->thd to ap_thread_current(), thus NULL if it's not a
  suitable thread for using thread local data.

* util_pcre.c(private_malloc):
  Fix a possible buf_used overflow (size <= avail < APR_ALIGN_DEFAULT(size)).
  Create the thread local subpool (once per thread) and allocate from there
  when stack space is missing and state->thd != NULL, otherwise fall back to
  malloc() still.

* util_pcre.c(private_free):
  Do nothing for thread local subpool memory, will be freed in cleanup_state
  eventually.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902731 13f79535-47bb-0310-9956-ffa450edef68

3 years agocore: Apply ap_max_mem_free to created threads' pool allocator.
Yann Ylavic [Fri, 15 Jul 2022 09:24:01 +0000 (09:24 +0000)] 
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

3 years agoMake pytest error whitelist a bit more explicit
Rainer Jung [Mon, 11 Jul 2022 13:49:45 +0000 (13:49 +0000)] 
Make pytest error whitelist a bit more explicit

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902660 13f79535-47bb-0310-9956-ffa450edef68

3 years agompm_winnt: Follow up to r1902636: another compilation error.
Yann Ylavic [Mon, 11 Jul 2022 00:26:12 +0000 (00:26 +0000)] 
mpm_winnt: Follow up to r1902636: another compilation error.

Same error, elsewhere.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902641 13f79535-47bb-0310-9956-ffa450edef68

3 years agompm_winnt: Fix compilation error.
Yann Ylavic [Sun, 10 Jul 2022 16:58:00 +0000 (16:58 +0000)] 
mpm_winnt: Fix compilation error.

server\mpm\winnt\child.c(1210,1): error C2440: 'initializing': cannot convert from 'worker_info' to 'worker_info *'

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902636 13f79535-47bb-0310-9956-ffa450edef68

3 years agoFollow-up to r1902572: Remove now unused #include.
Ivan Zhakov [Fri, 8 Jul 2022 16:24:37 +0000 (16:24 +0000)] 
Follow-up to r1902572: Remove now unused #include.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902573 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRewrite ap_regexec() without a thread-local storage context for allocations.
Ivan Zhakov [Fri, 8 Jul 2022 15:07:00 +0000 (15:07 +0000)] 
Rewrite ap_regexec() without a thread-local storage context for allocations.

Provide custom malloc() and free() implementations that use a stack buffer
for first N bytes and then fall back to an ordinary malloc/free().

The key properties of this approach are:

1) Allocations with PCRE2 happen the same way as they were happening
with PCRE1 in httpd 2.4.52 and earlier.

2) There are no malloc()/free() calls for typical cases where the
match data can be kept on stack.

3) The patch avoids a malloc() for the match_data structure itself,
because the match data is allocated with the provided custom malloc()
function.

4) Using custom allocation functions should ensure that PCRE is not
going to use malloc() for any auxiliary allocations, if they are
necessary.

5) There is no per-thread state.

References:
1) https://lists.apache.org/thread/l6m7dqjkk0yy3tooyd2so0rb20jmtpwd
2) https://lists.apache.org/thread/5k9y264whn4f1ll35tvl2164dz0wphvy

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902572 13f79535-47bb-0310-9956-ffa450edef68

3 years agoUpdate to test with OpenSSL 3.0.5.
Joe Orton [Tue, 5 Jul 2022 11:53:43 +0000 (11:53 +0000)] 
Update to test with OpenSSL 3.0.5.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902482 13f79535-47bb-0310-9956-ffa450edef68

3 years agofr doc rebuild.
Lucien Gentis [Sat, 2 Jul 2022 14:10:15 +0000 (14:10 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902411 13f79535-47bb-0310-9956-ffa450edef68

3 years agofr doc XML file update.
Lucien Gentis [Sat, 2 Jul 2022 14:09:14 +0000 (14:09 +0000)] 
fr doc XML file update.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902410 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) mod_http2: fixed trailer handling. Empty response bodies
Stefan Eissing [Sat, 2 Jul 2022 09:39:22 +0000 (09:39 +0000)] 
  *) mod_http2: fixed trailer handling. Empty response bodies
     prevented trailers from being sent to a client. See
     <https://github.com/icing/mod_h2/issues/233> for how
     this affected gRPC use.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902409 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) test/modules/http2: adding tests for response trailers with
Stefan Eissing [Sat, 2 Jul 2022 09:11:31 +0000 (09:11 +0000)] 
  *) test/modules/http2: adding tests for response trailers with
     or without a body. This reproduces a bug reported in
     <https://github.com/icing/mod_h2/issues/233>
     where trailers are not sent on an empty response
     body. This is used in gRPC.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902408 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) test: improved nghttp client output parsing.
Stefan Eissing [Sat, 2 Jul 2022 08:58:26 +0000 (08:58 +0000)] 
  *) test: improved nghttp client output parsing.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902407 13f79535-47bb-0310-9956-ffa450edef68

3 years agoTrigger ci (check APR revert r1902369).
Yann Ylavic [Thu, 30 Jun 2022 13:44:58 +0000 (13:44 +0000)] 
Trigger ci (check APR revert r1902369).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902370 13f79535-47bb-0310-9956-ffa450edef68

3 years agoAdd .vs to svn:ignore.
Ivan Zhakov [Thu, 30 Jun 2022 12:49:17 +0000 (12:49 +0000)] 
Add .vs to svn:ignore.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902368 13f79535-47bb-0310-9956-ffa450edef68

3 years ago* CMakeLists.txt: Use full path to gen_test_char.exe in CUSTOM_COMMAND.
Ivan Zhakov [Thu, 30 Jun 2022 12:37:44 +0000 (12:37 +0000)] 
* CMakeLists.txt: Use full path to gen_test_char.exe in CUSTOM_COMMAND.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902366 13f79535-47bb-0310-9956-ffa450edef68

3 years agobetter error message
Giovanni Bechis [Tue, 28 Jun 2022 16:49:43 +0000 (16:49 +0000)] 
better error message

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902324 13f79535-47bb-0310-9956-ffa450edef68

3 years agocheck apr_sockaddr_info_get return value
Giovanni Bechis [Tue, 28 Jun 2022 13:06:55 +0000 (13:06 +0000)] 
check apr_sockaddr_info_get return value
bz #66136

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902318 13f79535-47bb-0310-9956-ffa450edef68

3 years agocheck apr_sockaddr_info_get() return value
Giovanni Bechis [Tue, 28 Jun 2022 13:05:20 +0000 (13:05 +0000)] 
check apr_sockaddr_info_get() return value
bz #66135

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902317 13f79535-47bb-0310-9956-ffa450edef68

3 years agocheck BN_bn2dec return value
Giovanni Bechis [Tue, 28 Jun 2022 07:52:23 +0000 (07:52 +0000)] 
check BN_bn2dec return value

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902302 13f79535-47bb-0310-9956-ffa450edef68

3 years agoFix new typo in docs...
Rainer Jung [Tue, 21 Jun 2022 10:27:00 +0000 (10:27 +0000)] 
Fix new typo in docs...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902133 13f79535-47bb-0310-9956-ffa450edef68

3 years ago*) mod_heartmonitor: Document interaction between
Rainer Jung [Tue, 21 Jun 2022 10:19:26 +0000 (10:19 +0000)] 
*) mod_heartmonitor: Document interaction between
   HeartbeatStorage and HeartbeatMaxServers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902132 13f79535-47bb-0310-9956-ffa450edef68

3 years agoFix numeric check for HeartbeatMaxServers.
Rainer Jung [Tue, 21 Jun 2022 10:10:29 +0000 (10:10 +0000)] 
Fix numeric check for HeartbeatMaxServers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902130 13f79535-47bb-0310-9956-ffa450edef68

3 years ago*) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
Rainer Jung [Mon, 20 Jun 2022 20:54:14 +0000 (20:54 +0000)] 
*) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
   to use file based storage instead of slotmem.
   Needed after setting HeartbeatMaxServers default
   to the documented value 10 in 2.4.54.
   [Jérôme Billira

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902117 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) mod_http2: remove the workers pool from APR_POOL_DEBUG
Stefan Eissing [Mon, 20 Jun 2022 11:25:42 +0000 (11:25 +0000)] 
  *) mod_http2: remove the workers pool from APR_POOL_DEBUG
     logging now that h2_workers is opaque.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902095 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) mod_http2: init local var since write in loop may be buypassed.
Stefan Eissing [Mon, 20 Jun 2022 07:21:58 +0000 (07:21 +0000)] 
  *) mod_http2: init local var since write in loop may be buypassed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902082 13f79535-47bb-0310-9956-ffa450edef68

3 years ago* Use s directly like in the other ap_log_error calls
Ruediger Pluem [Mon, 20 Jun 2022 07:14:05 +0000 (07:14 +0000)] 
* Use s directly like in the other ap_log_error calls

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902081 13f79535-47bb-0310-9956-ffa450edef68

3 years ago* workers is not always initialized here
Ruediger Pluem [Mon, 20 Jun 2022 07:11:09 +0000 (07:11 +0000)] 
* workers is not always initialized here

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902080 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) mod_http2: new implementation of h2 worker pool.
Stefan Eissing [Fri, 17 Jun 2022 09:24:57 +0000 (09:24 +0000)] 
  *) mod_http2: new implementation of h2 worker pool.
     - O(1) cost at registration of connection processing producers
     - no limit on registered producers
     - join of ongoing work on unregister
     - callbacks to unlink dependencies into other h2 code
     - memory cleanup on workers deactivation (on idle timeouts)
     - idle_limit as apr_time_t instead of seconds

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902005 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) mod_http2: fix an edge case in h2_fifo_remove,
Stefan Eissing [Fri, 17 Jun 2022 09:06:35 +0000 (09:06 +0000)] 
  *) mod_http2: fix an edge case in h2_fifo_remove,
     improve c1 connection flushing, fix an UAF in
     recycling transit pools.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1902004 13f79535-47bb-0310-9956-ffa450edef68

3 years agocore: log_tid support on FreeBSD.
Yann Ylavic [Thu, 16 Jun 2022 14:25:05 +0000 (14:25 +0000)] 
core: log_tid support on FreeBSD.

Use pthread_getthreadid_np() when available.

BZ: 65835
Submitted by: David CARLIER <devnexen gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901975 13f79535-47bb-0310-9956-ffa450edef68

3 years agompm_prefork: Do not access the POD in ONE_PROCESS mode.
Yann Ylavic [Thu, 16 Jun 2022 13:54:39 +0000 (13:54 +0000)] 
mpm_prefork: Do not access the POD in ONE_PROCESS mode.

There is no POD created in ONE_PROCESS mode, so avoid crashing in child_main()
and clean_child_exit().

While at it, remove a dead code path in prefork_run() which is never reached
since the one_process path already returns/exits above.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901974 13f79535-47bb-0310-9956-ffa450edef68

3 years agoRemove an empty line to synch with 2.4.x
Christophe Jaillet [Sun, 12 Jun 2022 08:43:22 +0000 (08:43 +0000)] 
Remove an empty line to synch with 2.4.x

[skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901842 13f79535-47bb-0310-9956-ffa450edef68

3 years ago *) test/modules/tls: remove some duplicate parameters for
Stefan Eissing [Fri, 10 Jun 2022 09:06:26 +0000 (09:06 +0000)] 
  *) test/modules/tls: remove some duplicate parameters for
     test_15_proxy_tls_h2_vars.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901804 13f79535-47bb-0310-9956-ffa450edef68

3 years agomod_ssl: Missing bit from r1901470 to handle OpenSSL-3+ FIPS.
Yann Ylavic [Thu, 9 Jun 2022 09:53:12 +0000 (09:53 +0000)] 
mod_ssl: Missing bit from r1901470 to handle OpenSSL-3+ FIPS.

OPENSSL_FIPS is no longer defined with openssl-3, it always HAVE_FIPS.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901772 13f79535-47bb-0310-9956-ffa450edef68

3 years agofixed in 1.7 SVN but not released
Eric Covener [Sat, 4 Jun 2022 20:21:06 +0000 (20:21 +0000)] 
fixed in 1.7 SVN but not released

just in case we reroll.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901645 13f79535-47bb-0310-9956-ffa450edef68

3 years ago-qinitauto=FE conflicts with -qcheck=unset
Eric Covener [Sat, 4 Jun 2022 15:37:33 +0000 (15:37 +0000)] 
-qinitauto=FE conflicts with -qcheck=unset

maintainer mode only

causes a warning for every compiler invocation.  If automatics are initialized
by -qinitauto, use before being assigned cannot be detected with -qcheck=unset
(part of all)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901633 13f79535-47bb-0310-9956-ffa450edef68

3 years agofr doc rebuild.
Lucien Gentis [Sat, 4 Jun 2022 15:26:37 +0000 (15:26 +0000)] 
fr doc rebuild.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901630 13f79535-47bb-0310-9956-ffa450edef68

3 years agofr doc XML files updates.
Lucien Gentis [Sat, 4 Jun 2022 15:25:39 +0000 (15:25 +0000)] 
fr doc XML files updates.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901629 13f79535-47bb-0310-9956-ffa450edef68

3 years agoforce to 0 on 1.6 on Windows
Eric Covener [Sat, 4 Jun 2022 12:06:23 +0000 (12:06 +0000)] 
force to 0 on 1.6 on Windows

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901619 13f79535-47bb-0310-9956-ffa450edef68

3 years agotypo [skip ci]
Giovanni Bechis [Fri, 3 Jun 2022 14:55:48 +0000 (14:55 +0000)] 
typo [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901596 13f79535-47bb-0310-9956-ffa450edef68

3 years agokick ci
Eric Covener [Thu, 2 Jun 2022 21:39:04 +0000 (21:39 +0000)] 
kick ci

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901571 13f79535-47bb-0310-9956-ffa450edef68

3 years agoTrigger ci.
Yann Ylavic [Thu, 2 Jun 2022 12:31:41 +0000 (12:31 +0000)] 
Trigger ci.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901557 13f79535-47bb-0310-9956-ffa450edef68

3 years agoSync CHANGES [skip ci]
Yann Ylavic [Thu, 2 Jun 2022 09:58:42 +0000 (09:58 +0000)] 
Sync CHANGES [skip ci]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901551 13f79535-47bb-0310-9956-ffa450edef68