]> git.ipfire.org Git - thirdparty/apache/httpd.git/log
thirdparty/apache/httpd.git
3 years agoLength computed by count_string() are accumulated in an apr_size_t, so be more consis...
Christophe Jaillet [Wed, 4 May 2022 20:28:32 +0000 (20:28 +0000)] 
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.

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

3 years agodav_get_liveprop_info() returns a long not an int.
Christophe Jaillet [Wed, 4 May 2022 18:27:29 +0000 (18:27 +0000)] 
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

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

3 years agohttpd 2.4.x and above require at least APR 1.3, so this is always the case.
Christophe Jaillet [Wed, 4 May 2022 17:49:03 +0000 (17:49 +0000)] 
httpd 2.4.x and above require at least APR 1.3, so this is always the case.
Simplify the wording in the doc.

[skip ci]

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

3 years agoUpdate to testing against OpenSSL 3.0.3.
Joe Orton [Wed, 4 May 2022 08:47:05 +0000 (08:47 +0000)] 
Update to testing against OpenSSL 3.0.3.

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

3 years agohttpd 2.4.x and above require at least APR 1.3, so this is always the case.
Christophe Jaillet [Tue, 3 May 2022 19:56:29 +0000 (19:56 +0000)] 
httpd 2.4.x and above require at least APR 1.3, so this is always the case.
Simplify the wording in the doc.

[skip ci]

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

3 years agofr doc rebuild.
Lucien Gentis [Sat, 30 Apr 2022 15:46:49 +0000 (15:46 +0000)] 
fr doc rebuild.

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

3 years agofr doc XML file updates.
Lucien Gentis [Sat, 30 Apr 2022 15:45:49 +0000 (15:45 +0000)] 
fr doc XML file updates.

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

3 years agoab: Add the -W option to use worker threads.
Yann Ylavic [Thu, 28 Apr 2022 13:57:15 +0000 (13:57 +0000)] 
ab: Add the -W option to use worker threads.

This allows for multiple CPUs to handle the load, the number of requests and
concurrency level asked are distributed over the configured number of workers,
allowing for as much parallelism.

On unixes (only for now), -W0 will use all the CPUs available on the system.

To avoid synchronization during runtime, the stats and requests times are
gathered per worker and consolidated at the end of the run before being
printed.

Connection closes, keepalives and errors are now handled in a single place,
namely cleanup_connection(), which takes care of the good/bad state of each
request based on the response fully received or not.

When multiple workers are running, SIGINT is handled by the main thread only
and masked in workers, workers are asked to stop and woken up if waiting in
poll().

A single worker is started first to determine the connectivity with the peer,
if that fails (10 tries) ab will stop early still without starting the other
workers, otherwise the first worker will signal the main thread to start the
others.

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

3 years ago *) mod_http2: remove unused and insecure code. Fixes PR66037.
Stefan Eissing [Thu, 28 Apr 2022 10:41:48 +0000 (10:41 +0000)] 
  *) mod_http2: remove unused and insecure code. Fixes PR66037.
     Thanks to Ronald Crane (Zippenhop LLC) for reporting this.

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

3 years agoThe only caller of hm_processmsg() passes an apr_size_t for the last parameter, so...
Christophe Jaillet [Wed, 27 Apr 2022 20:36:14 +0000 (20:36 +0000)] 
The only caller of hm_processmsg() passes an apr_size_t for the last parameter, so be consistent and update the definition accordingly.

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

3 years agoHarden mod_session and avoid overflow in case of indecently large session
Christophe Jaillet [Wed, 27 Apr 2022 20:08:50 +0000 (20:08 +0000)] 
Harden mod_session and avoid overflow in case of indecently large session

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

3 years ago * removing duplicatae changes entry
Stefan Eissing [Wed, 27 Apr 2022 12:07:18 +0000 (12:07 +0000)] 
 * removing duplicatae changes entry
[skip ci]

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

3 years ago *) mod_md: implement full auto status ("key: value" type status output).
Stefan Eissing [Wed, 27 Apr 2022 11:53:04 +0000 (11:53 +0000)] 
  *) mod_md: implement full auto status ("key: value" type status output).
     Especially not only status summary counts for certificates and
     OCSP stapling but also lists. Auto status format is similar to
     what was used for mod_proxy_balancer.

added change desription for code added in r1900313.

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

3 years ago *) mod_md: added support for managing certificates via a
Stefan Eissing [Wed, 27 Apr 2022 11:48:36 +0000 (11:48 +0000)] 
  *) mod_md: added support for managing certificates via a
     local tailscale demon for users of that secure networking.
     This gives trusted certificates for tailscale  assigned
     domain names in the *.ts.net space.

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

3 years ago* modules/ssl/ssl_engine_io.c:
Joe Orton [Wed, 27 Apr 2022 07:45:01 +0000 (07:45 +0000)] 
* modules/ssl/ssl_engine_io.c:
  Drop noop functions for BIO methods mod_ssl doesn't implement.
  OpenSSL handles missing BIO methods internally in BIO_xxxx() wrappers.
  Consistently log at TRACE4 unhandled _ctrl commands, but note
  these are not a "BUG" as in the previous log message.

PR: 66028
Github: closes #316

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

3 years ago* Use apr_size_t instead of int to avoid an overflow
Ruediger Pluem [Wed, 27 Apr 2022 06:43:11 +0000 (06:43 +0000)] 
* Use apr_size_t instead of int to avoid an overflow

PR: 66034

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

3 years ago* Avoid an overflow on large inputs
Ruediger Pluem [Wed, 27 Apr 2022 06:35:02 +0000 (06:35 +0000)] 
* Avoid an overflow on large inputs

PR: 66033

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

3 years agoab: Allow for TLSv1.3 when the SSL library supports it.
Yann Ylavic [Fri, 22 Apr 2022 13:04:51 +0000 (13:04 +0000)] 
ab: Allow for TLSv1.3 when the SSL library supports it.

When TLS1_3_VERSION is defined by the SSL library, bump the maximum TLS
protocol to that and use it for "-f ALL" or "-f TLSv1.3".

This mixes proposed patches from BZ 63594 and 64699.

BZ: 63594, 64699
Submitted by: abhilash <abhilash1232 gmail.com>
Submitted by: xiaolongx.jiang intel.com
Submitted & Reviewed by: ylavic

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

3 years agoab: apr_base64_encode already NUL-terminate the output.
Yann Ylavic [Fri, 22 Apr 2022 12:14:01 +0000 (12:14 +0000)] 
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.

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

3 years ago *) mod_md: a possible NULL pointer deref was fixed in
Stefan Eissing [Fri, 22 Apr 2022 08:45:31 +0000 (08:45 +0000)] 
  *) mod_md: a possible NULL pointer deref was fixed in
     the JSON code for persisting time periods (start+end).
     Fixes #282 on mod_md's github.

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

3 years ago *) mod_http2: clear the h2 worker slot connection early to avoid
Stefan Eissing [Thu, 21 Apr 2022 11:21:50 +0000 (11:21 +0000)] 
  *) mod_http2: clear the h2 worker slot connection early to avoid
     any race in slot updates after the connection has been handled.

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

3 years ago *) mod_http2: fix edge case in removal of entries
Stefan Eissing [Thu, 21 Apr 2022 10:31:37 +0000 (10:31 +0000)] 
  *) mod_http2: fix edge case in removal of entries
     in a h2_fifo.

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

3 years agocore: Disable TCP_NOPUSH optimization on OSX. BZ 66019.
Yann Ylavic [Thu, 21 Apr 2022 10:02:29 +0000 (10:02 +0000)] 
core: Disable TCP_NOPUSH optimization on OSX. BZ 66019.

OSX supports TCP_NOPUSH but does not release the data retained (in TCP stack)
when the option is unset. It seems that unsetting it before the last write
does not help either so just disable the optimization for OSX in the core
output filter to avoid uncontrollable transmission delays.

* server/core_filters.c():
  Add the sock_nopush() helper that does nothing on OSX and platforms not
  supporting TCP_NOPUSH or TCP_CORK.

* server/core_filters.c(send_brigade_nonblocking):
  Use sock_nopush() instead of apr_socket_opt_set() for APR_TCP_NOPUSH option.

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

3 years agofix select-groups example, bz 66010
Giovanni Bechis [Wed, 20 Apr 2022 16:49:15 +0000 (16:49 +0000)] 
fix select-groups example, bz 66010

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

3 years agoFix alignment in an 'if' block.
Christophe Jaillet [Wed, 20 Apr 2022 06:52:58 +0000 (06:52 +0000)] 
Fix alignment in an 'if' block.

[skip ci]

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

3 years ago * Implement full auto status ("key: value" type status output).
Stefan Eissing [Tue, 19 Apr 2022 14:11:39 +0000 (14:11 +0000)] 
 * Implement full auto status ("key: value" type status output).
   Especially not only status summary counts for certificates and
   OCSP stapling but also lists. Auto status format is similar to
   what was used for mod_proxy_balancer.
   [Rainer Jung]

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

3 years ago *) mod_http2: make APLOGNO check happy with line continuation.
Stefan Eissing [Tue, 19 Apr 2022 13:44:05 +0000 (13:44 +0000)] 
  *) mod_http2: make APLOGNO check happy with line continuation.

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

3 years ago *) mod_http2: using new session ids also in logging for connection
Stefan Eissing [Tue, 19 Apr 2022 10:36:53 +0000 (10:36 +0000)] 
  *) mod_http2: using new session ids also in logging for connection
     contexts and bucket beams.

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

3 years ago *) mod_http2: use new ap_sb_get_child_thread() to get child_num
Stefan Eissing [Tue, 19 Apr 2022 10:17:05 +0000 (10:17 +0000)] 
  *) mod_http2: use new ap_sb_get_child_thread() to get child_num
     and create unique h2 session identifiers in logging that stay
     unique among re-activations of the master connection.

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

3 years ago *) core: add ap_sb_get_child_thread() to retrieve child_num
Stefan Eissing [Tue, 19 Apr 2022 10:16:02 +0000 (10:16 +0000)] 
  *) core: add ap_sb_get_child_thread() to retrieve child_num
     and thread_num from a scoreboard handle.

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

3 years ago *) mod_proxy: Add backend port to log messages to
Rainer Jung [Tue, 19 Apr 2022 09:14:10 +0000 (09:14 +0000)] 
  *) mod_proxy: Add backend port to log messages to
     ease identification of involved service.

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

3 years ago *) mod_heartmonitor: Set the documented default value
Rainer Jung [Tue, 19 Apr 2022 08:59:47 +0000 (08:59 +0000)] 
  *) mod_heartmonitor: Set the documented default value
     "10" for HeartbeatMaxServers instead of "0". With "0"
     no shared memory slotmem was initialized. [Rainer Jung]

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

3 years agoRevert r1899809: Will reapply using new
Rainer Jung [Tue, 19 Apr 2022 08:58:07 +0000 (08:58 +0000)] 
Revert r1899809: Will reapply using new
changes-entries method for CHANGES handling.

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

3 years ago *) de-duplicate ALOGNO from code copy.
Stefan Eissing [Tue, 19 Apr 2022 08:57:29 +0000 (08:57 +0000)] 
  *) de-duplicate ALOGNO from code copy.

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

3 years agoalloc number [skip ci]
Stefan Eissing [Tue, 19 Apr 2022 08:51:07 +0000 (08:51 +0000)] 
alloc number [skip ci]

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

3 years ago *) core: improved checks in ap_escape_quotes() for
Stefan Eissing [Sat, 16 Apr 2022 10:09:59 +0000 (10:09 +0000)] 
  *) core: improved checks in ap_escape_quotes() for
     extra long strings (or resulting strings) that
     exceed ptrdiff_t ranges.
     [Yann Ylavic, Stefan Eissing]

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

3 years ago* Add Changelog for r1899451, r1899454, r1899562, r1899564, r1899584
Ruediger Pluem [Fri, 15 Apr 2022 11:42:58 +0000 (11:42 +0000)] 
* Add Changelog for r1899451, r1899454, r1899562, r1899564, r1899584

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

3 years ago *) test: core stress test_core_002 enhanved to monitor dynamic child
Stefan Eissing [Fri, 15 Apr 2022 10:59:22 +0000 (10:59 +0000)] 
  *) test: core stress test_core_002 enhanved to monitor dynamic child
     changes on load and graceful reload of the server.

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

3 years ago* Port r1899858, r1899865 to worker MPM
Ruediger Pluem [Fri, 15 Apr 2022 10:56:05 +0000 (10:56 +0000)] 
* Port r1899858, r1899865 to worker MPM

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

3 years agompm_event: Follow up to r1899858: Avoid explicit sleep.
Yann Ylavic [Thu, 14 Apr 2022 17:04:08 +0000 (17:04 +0000)] 
mpm_event: Follow up to r1899858: Avoid explicit sleep.

Instead, we can simply go to ap_wait_or_timeout() again.

While at it, improve the comment about killed processes.

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

3 years agotest/core: Allow for 12 simultaneous connections in test_core_002_01.
Yann Ylavic [Thu, 14 Apr 2022 15:26:21 +0000 (15:26 +0000)] 
test/core: Allow for 12 simultaneous connections in test_core_002_01.

It seems that h2load somehow issues more connections than the 6 requested (saw
up to 12), so adapt the MPM event configuration accordingly.

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

3 years agompm_event: Handle children killed pathologically.
Yann Ylavic [Thu, 14 Apr 2022 14:38:03 +0000 (14:38 +0000)] 
mpm_event: Handle children killed pathologically.

If children processes get killed (SIGSEGV/SIGABRT/..) early after starting or
frequently enough then we never enter perform_idle_server_maintenance() to
try something.

Below three successive children killed restart them immediately, above three
let's sleep the usual 1s (to avoid fork()s flood) and do the idle maintenance.

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

3 years agoReserve one APLOGNO [skip ci]
Yann Ylavic [Thu, 14 Apr 2022 14:19:04 +0000 (14:19 +0000)] 
Reserve one APLOGNO [skip ci]

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

3 years ago *) test/core: using rate periods for creating new connections
Stefan Eissing [Thu, 14 Apr 2022 11:37:30 +0000 (11:37 +0000)] 
  *) test/core: using rate periods for creating new connections
     over time.

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

3 years ago *) test/core: start of a stress test case, skipped unless
Stefan Eissing [Thu, 14 Apr 2022 11:09:50 +0000 (11:09 +0000)] 
  *) test/core: start of a stress test case, skipped unless
     environment variable STRESS_TEST is present.

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

3 years ago *) mod_http: on seeing EOC buckets in ap_http_header_filter(), further
Stefan Eissing [Thu, 14 Apr 2022 10:12:20 +0000 (10:12 +0000)] 
  *) mod_http: on seeing EOC buckets in ap_http_header_filter(), further
     analysis of the brigade is stopped. This means a RESPONSE will not
     be generated (if that had not already happened due to other buckets).
     Also, improve the `header_only` handling to cope with brigades that
     contain buckets like `RESPONSE DATA EOS` in one pass.

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

3 years agomod_heartmonitor: Fix setting and comparison of IPs fields.
Yann Ylavic [Thu, 14 Apr 2022 09:44:35 +0000 (09:44 +0000)] 
mod_heartmonitor: Fix setting and comparison of IPs fields.

Setting or comparing hm_server_t and hm_slot_server_t IPs should not be base
on MAXIPSIZE since the former is potentially a smaller const char*.

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

3 years ago *) mod_http: use defined constant instead of just '101' when
Stefan Eissing [Thu, 14 Apr 2022 08:24:19 +0000 (08:24 +0000)] 
  *) mod_http: use defined constant instead of just '101' when
     testing response stati.

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

3 years agompm_event: Follow up to r1899777: Fix max_daemon_used.
Yann Ylavic [Wed, 13 Apr 2022 13:51:04 +0000 (13:51 +0000)] 
mpm_event: Follow up to r1899777: Fix max_daemon_used.

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

3 years agomod_heartmonitor: Set the documented default value
Rainer Jung [Wed, 13 Apr 2022 12:11:01 +0000 (12:11 +0000)] 
mod_heartmonitor: Set the documented default value
"10" for HeartbeatMaxServers instead of "0". With "0"
no shared memory slotmem was initialized.

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

3 years ago *) mod_http2: use the new REQUEST buckets to forward request
Stefan Eissing [Wed, 13 Apr 2022 08:38:12 +0000 (08:38 +0000)] 
  *) mod_http2: use the new REQUEST buckets to forward request
     on secondary connections. Use the now generic
     ap_process_connection() in h2 workers to process those.

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

3 years agoMerge PR 311:
Stefan Eissing [Wed, 13 Apr 2022 07:40:17 +0000 (07:40 +0000)] 
Merge PR 311:

  *) core/mod_http: use REQUEST meta buckets and a new HTTP/1.x specific
     input filter to separate the handling for HTTP requests from the
     handling of HTTP/1.x request parsing and checks.
     A new HTTP1_REQUEST_IN filter installs itself on http/1.1 connections
     before a request is being read. It generates either a REQUEST meta
     bucket on success or an ERROR bucket with the proposed response status.
     The core connection processing, relying on ap_read_request(), now expects
     a REQUEST or ERROR bucket from the input filters and is agnostic to
     specific HTTP versions and how they bring requests into the server.

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

3 years agoFollow up to r1899777: CHANGES entry [skip ci].
Yann Ylavic [Tue, 12 Apr 2022 17:43:20 +0000 (17:43 +0000)] 
Follow up to r1899777: CHANGES entry [skip ci].

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

3 years agoRemove libsystemd dependency from main httpd binary
Joe Orton [Tue, 12 Apr 2022 15:43:04 +0000 (15:43 +0000)] 
Remove libsystemd dependency from main httpd binary

Until this change httpd was linking libsystemd to the main httpd binary. If you want to run lightweight version of httpd in container, sometimes you just want to install
httpd binary with as little dependencies as possible to make container small in size and do not pull uncencessary dependencies and libraries.

This change will move all systemd library calls from listen.c to mod_systemd module and remove systemd linking from the main httpd bin.
Fixed mixed declaration and wrongly declared variable.

Submitted by: LuboÅ¡ Uhliarik <luhliari redhat.com>

Github: closes #312

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

3 years agompm_event: Fix accounting of active/total processes on ungraceful restart.
Yann Ylavic [Tue, 12 Apr 2022 12:08:02 +0000 (12:08 +0000)] 
mpm_event: Fix accounting of active/total processes on ungraceful restart.

Children processes terminated by ap_{reclaim,relieve}_child_processes() were
were not un-accounted for total_daemons and active_daemons, which was done in
server_main_loop() only. This led to perform_idle_server_maintenance() thinking
it was over the limit of children processes and never create new ones.

Have this accounting right in event_note_child_{started,stopped}() which is
called both at runtime and reload time.

* server/mpm/event/event.c(struct event_retained_data):
  Rename field max_daemons_limit to max_daemon_used to better describe what
  it's about and to align with AP_MPMQ_MAX_DAEMON_USED.

* server/mpm/event/event.c(event_note_child_stopped):
  Renamed from event_note_child_killed() to clarify that it's not only called
  when a child is killed (i.e. on restart) but whenever a child has stopped.

* server/mpm/event/event.c(event_note_child_stopped):
  Move decrementing {active,total}_daemons and marking child's threads as
  SERVER_DEAD from server_main_loop() so that it's done both at runtime and
  reload time. Log the current number/state of daemons at APLOG_DEBUG level
  for each child stopped.

* server/mpm/event/event.c(event_note_child_started):
  Move incrementing {active,total}_daemons from make_child() for symmetry,
  given that make_child() calls event_note_child_started(). Log the current
  number/state of daemons at APLOG_DEBUG level for each child started.

* server/mpm/event/event.c(perform_idle_server_maintenance):
  Fix possible miscounting of retained->max_daemon_used accross the multiple
  calls to perform_idle_server_maintenance() if ListenCoresBucketsRatio > 0.
  Pass an int *max_daemon_used which starts at zero and is bumped consistently
  for all the buckets, while retained->max_daemon_used is updated only after
  all the buckets have been maintained.

* server/mpm/event/event.c(perform_idle_server_maintenance):
  Use event_note_child_stopped() to handle exited children processes.

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

3 years agostealing a log tag number. [skip ci]
Stefan Eissing [Mon, 11 Apr 2022 07:56:18 +0000 (07:56 +0000)] 
stealing a log tag number. [skip ci]

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

3 years ago *) mod_http2: some minor tweaks to connection mood updates.
Stefan Eissing [Fri, 8 Apr 2022 07:46:33 +0000 (07:46 +0000)] 
  *) mod_http2: some minor tweaks to connection mood updates.

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

3 years ago *) mod_http2: use the new RESPONSE buckets introduced in r1899648.
Stefan Eissing [Thu, 7 Apr 2022 10:55:09 +0000 (10:55 +0000)] 
  *) mod_http2: use the new RESPONSE buckets introduced in r1899648.
     This replaces the internal H2_HEADERS bucket, removing its
     source file and also obsoletes any interim response parsing
     needs.

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

3 years ago *) core/mod_http: use RESPONSE meta buckets and a new HTTP/1.x specific
Stefan Eissing [Thu, 7 Apr 2022 10:41:46 +0000 (10:41 +0000)] 
  *) core/mod_http: use RESPONSE meta buckets and a new HTTP/1.x specific
     filter to send responses through the output filter chain.
     Specifically: the HTTP_HEADER output filter and ap_send_interim_response()
     create a RESPONSE bucket and no longer are concerned with HTTP/1.x
     serialization.
     A new HTTP1_RESPONSE_OUT transcode filter writes the proper HTTP/1.x
     bytes when dealing with a RESPONSE bucket. That filter installs itself
     on the pre_read_request hook when the connection has protocol 'http/1.1'.

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

3 years ago *) core: make ap_escape_quotes() work correctly on strings
Stefan Eissing [Wed, 6 Apr 2022 09:17:42 +0000 (09:17 +0000)] 
  *) core: make ap_escape_quotes() work correctly on strings
     with more than MAX_INT/2 characters, counting quotes double.
     Credit to <generalbugs@zippenhop.com> for finding this.

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

3 years ago* Report a broken backend in case reading the response line failed on the
Ruediger Pluem [Tue, 5 Apr 2022 14:18:09 +0000 (14:18 +0000)] 
* Report a broken backend in case reading the response line failed on the
  first request on this connection otherwise we assume we have just run
  into a keepalive race and the backend is still healthy.

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

3 years ago* Keep track of the number of keepalives we processed on this connection.
Ruediger Pluem [Mon, 4 Apr 2022 16:00:58 +0000 (16:00 +0000)] 
* Keep track of the number of keepalives we processed on this connection.

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

3 years ago* We need to set r->status on each call after we noticed an EOC as
Ruediger Pluem [Mon, 4 Apr 2022 15:48:06 +0000 (15:48 +0000)] 
* We need to set r->status on each call after we noticed an EOC as
  data bucket generators like ap_die might have changed the status
  code. But we know better in this case and insist on the status
  code that we have seen in the error bucket.

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

3 years ago* Fix typo
Ruediger Pluem [Mon, 4 Apr 2022 14:12:26 +0000 (14:12 +0000)] 
* Fix typo

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

3 years agostealong on log number [skip ci]
Stefan Eissing [Mon, 4 Apr 2022 14:12:06 +0000 (14:12 +0000)] 
stealong on log number [skip ci]

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

3 years ago *) mod_http: genereate HEADERS buckets for trailers
Stefan Eissing [Mon, 4 Apr 2022 11:08:58 +0000 (11:08 +0000)] 
  *) mod_http: genereate HEADERS buckets for trailers
     mod_proxy: forward trailers on chunked request encoding
     test: add http/1.x test cases in pytest

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

3 years ago *) core: add ap_h1_append_header() for single header values.
Stefan Eissing [Mon, 4 Apr 2022 09:41:25 +0000 (09:41 +0000)] 
  *) core: add ap_h1_append_header() for single header values.
  *) mod_proxy: use of new ap_h1_header(s) functions for
     formatting HTTP/1.1 requests.

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

3 years ago *) core/mod_http/mod_http2:
Stefan Eissing [Mon, 4 Apr 2022 08:24:09 +0000 (08:24 +0000)] 
  *) core/mod_http/mod_http2:
     - adds new meta bucket types REQUEST, RESPONSE and HEADERS to the API.
     - adds a new method for setting standard response headers Date and Server
     - adds helper methods for formatting parts of HTTP/1.x, like headers and
       end chunks for use in non-core parts of the server, e.g. mod_proxy
     - splits the HTTP_IN filter into a "generic HTTP" and "specific HTTP/1.x"
       filter. The latter one named HTTP1_BODY_IN.
     - Uses HTTP1_BODY_IN only for requests with HTTP version <= 1.1
     - Removes the chunked input simulation from mod_http2
     - adds body_indeterminate flag to request_rec that indicates that a request
       body may be present and needs to be read/discarded. This replaces logic
       that thinks without Content-Length and Transfer-Encoding, no request
       body can exist.

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

3 years agofr doc rebuild.
Lucien Gentis [Sat, 2 Apr 2022 13:14:56 +0000 (13:14 +0000)] 
fr doc rebuild.

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

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

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

3 years agoRevert r1899390.
Jean-Frederic Clere [Fri, 1 Apr 2022 10:30:06 +0000 (10:30 +0000)] 
Revert r1899390.

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

3 years ago* In case we see an EOC bucket and there was an error bucket before, use its
Ruediger Pluem [Thu, 31 Mar 2022 20:10:21 +0000 (20:10 +0000)] 
* In case we see an EOC bucket and there was an error bucket before, use its
  status as status for the request. This should ensure proper status logging
  in the access log.

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

3 years ago* Close the connection in case an EOC bucket was seen
Ruediger Pluem [Thu, 31 Mar 2022 19:39:17 +0000 (19:39 +0000)] 
* Close the connection in case an EOC bucket was seen

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

3 years agoAdd WorkerBalancerGrowth. To allow creation of workers
Jean-Frederic Clere [Wed, 30 Mar 2022 14:42:14 +0000 (14:42 +0000)] 
Add WorkerBalancerGrowth. To allow creation of workers
to dynamically added balancers.

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

3 years agoignore file in git that come from `make check`
Stefan Eissing [Wed, 30 Mar 2022 13:47:44 +0000 (13:47 +0000)] 
ignore file in git that come from `make check`
[skip ci]

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

3 years ago *) test: verify that HTTP/2 response carry `Date` and
Stefan Eissing [Wed, 30 Mar 2022 08:07:13 +0000 (08:07 +0000)] 
  *) test: verify that HTTP/2 response carry `Date` and
     `Server` headers.

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

3 years agoxforms
Eric Covener [Mon, 28 Mar 2022 00:07:49 +0000 (00:07 +0000)] 
xforms

[skip ci]

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

3 years agoadd -n warnings/quirks
Eric Covener [Mon, 28 Mar 2022 00:06:37 +0000 (00:06 +0000)] 
add -n warnings/quirks

https://bz.apache.org/bugzilla/show_bug.cgi?id=65980

[skip ci]

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

3 years agoFix a typo.
Christophe Jaillet [Sun, 27 Mar 2022 06:43:26 +0000 (06:43 +0000)] 
Fix a typo.
PR 65978.

Thanks to Stefan Hamburger <apache_f5dosu stefanhamburger.de> for finding it.

[skip ci]

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

3 years agofr doc rebuild.
Lucien Gentis [Sat, 26 Mar 2022 14:09:31 +0000 (14:09 +0000)] 
fr doc rebuild.

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

3 years agofr doc XML doc file update.
Lucien Gentis [Sat, 26 Mar 2022 14:08:26 +0000 (14:08 +0000)] 
fr doc XML doc file update.

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

3 years ago'interpolate' is a keyword, not a user-defined string.
Christophe Jaillet [Sat, 26 Mar 2022 06:13:36 +0000 (06:13 +0000)] 
'interpolate' is a keyword, not a user-defined string.
So it should not be in <var></var> in <syntax>  and  <code> should be used instead of <var> in explanations.

While at it, fix some other style issues and missing links spotted here and there.

[skip ci]

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

3 years ago *) test: making pytest option --repeat global as otherwise
Stefan Eissing [Fri, 25 Mar 2022 13:44:41 +0000 (13:44 +0000)] 
  *) test: making pytest option --repeat global as otherwise
     there are conflicts when individual modules add that.

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

3 years ago *) test/modules/tls: make proxy tests repeatable.
Stefan Eissing [Fri, 25 Mar 2022 13:25:51 +0000 (13:25 +0000)] 
  *) test/modules/tls: make proxy tests repeatable.

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

3 years ago *) mod_http2: in a recent change, code was removed that prevented connections
Stefan Eissing [Thu, 24 Mar 2022 10:03:59 +0000 (10:03 +0000)] 
  *) mod_http2: in a recent change, code was removed that prevented connections
     with many parallel streams to stall. Re-added that, slightly improved and
     with a comment that explains the need for future humans.

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

3 years ago *) mod_http2: fixed a possible concurrency issue with
Stefan Eissing [Thu, 24 Mar 2022 09:06:29 +0000 (09:06 +0000)] 
  *) mod_http2: fixed a possible concurrency issue with
     registering h2_mplx at h2_workers.
     Improved h2_fifo internals efficiency inspired
     by ap_fdqueue.
     Made 711 tests repeatable.

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

3 years ago *) mod_http2: removed extra h2_mplx_worker_c2_done() arg
Stefan Eissing [Wed, 23 Mar 2022 09:15:30 +0000 (09:15 +0000)] 
  *) mod_http2: removed extra h2_mplx_worker_c2_done() arg
     to retrive another c2 for processing. Just added
     complexity without measurable benefits.

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

3 years ago *) mod_http2: when using a pipe for input signalling, always
Stefan Eissing [Mon, 21 Mar 2022 10:38:05 +0000 (10:38 +0000)] 
  *) mod_http2: when using a pipe for input signalling, always
     write to it on sending buckets, not only when it was empty.

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

3 years ago *) mod_http2: small improvements from the http1-separation
Stefan Eissing [Mon, 21 Mar 2022 09:54:41 +0000 (09:54 +0000)] 
  *) mod_http2: small improvements from the http1-separation
     branch that apply in general.

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

3 years ago *) mod_http2: remove internal bucket beamer registry and just
Stefan Eissing [Mon, 21 Mar 2022 09:02:51 +0000 (09:02 +0000)] 
  *) mod_http2: remove internal bucket beamer registry and just
     copy well-known meta buckets in a beam. Was too generic.

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

3 years ago *) mod_http2: use pollset only for main connection and wakeups
Stefan Eissing [Mon, 21 Mar 2022 08:19:28 +0000 (08:19 +0000)] 
  *) mod_http2: use pollset only for main connection and wakeups
     for events on streams. Provide streams in INPUT pipe when
     needed and supported on the platform.

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

3 years ago *) core: adding a new hook and method to the API:
Stefan Eissing [Fri, 18 Mar 2022 09:52:52 +0000 (09:52 +0000)] 
  *) core: adding a new hook and method to the API:
     create_secondary_connection and ap_create_secondary_connection()
     to setup connections related to a "master" one, as used in
     the HTTP/2 protocol implementation.

  *) mod_http2: using the new API calls to get rid of knowledge
     about how the core handles conn_rec specifics.
     Improvements in pollset stream handling to use less sets.
     Using atomic read/writes instead of volatiles now.
     Keeping a reserve of "transit" pools and bucket_allocs for
     use on secondary connections to avoid repeated setup/teardowns.

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

3 years agoUpdate to test against OpenSSL 3.0.2.
Joe Orton [Wed, 16 Mar 2022 10:39:47 +0000 (10:39 +0000)] 
Update to test against OpenSSL 3.0.2.

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

3 years ago *) mod_md: fix compiler warning about NULL arg to a %s log. Fixes PR 65955.
Stefan Eissing [Wed, 16 Mar 2022 08:28:27 +0000 (08:28 +0000)] 
  *) mod_md: fix compiler warning about NULL arg to a %s log. Fixes PR 65955.

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

3 years ago *) mod_http2: disabling use of apr_pollsets for secondary
Stefan Eissing [Tue, 15 Mar 2022 09:38:10 +0000 (09:38 +0000)] 
  *) mod_http2: disabling use of apr_pollsets for secondary
     connections. Measurements show that their use leads to
     up to 30% performance drop on busy scenarios.
     Detailed numbers in the comment where this is disabled.

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

3 years agofr doc rebuild.
Lucien Gentis [Sat, 12 Mar 2022 14:49:31 +0000 (14:49 +0000)] 
fr doc rebuild.

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

3 years agofr doc XML files updates.
Lucien Gentis [Sat, 12 Mar 2022 14:48:18 +0000 (14:48 +0000)] 
fr doc XML files updates.

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

3 years ago* Improve detection of _Thread_local
Ruediger Pluem [Wed, 9 Mar 2022 07:35:01 +0000 (07:35 +0000)] 
* 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

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

3 years ago* Improve the logic flow
Ruediger Pluem [Tue, 8 Mar 2022 15:41:55 +0000 (15:41 +0000)] 
* Improve the logic flow

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

3 years ago* Avoid "may be uninitialized" warning
Ruediger Pluem [Tue, 8 Mar 2022 13:01:25 +0000 (13:01 +0000)] 
* Avoid "may be uninitialized" warning

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