Commit Graph

182 Commits

Author SHA1 Message Date
a47ee08073 *) mod_md:
- Enabling ED25519 support and certificate transparency information when
       building with libressl v3.5.0 and newer. Thanks to Giovanni Bechis.
     - MDChallengeDns01 can now be configured for individual domains.
       Thanks to Jérôme Billiras (@bilhackmac) for the initial PR.
     - Fixed a bug found by Jérôme Billiras (@bilhackmac) that caused the challenge
       teardown not being invoked as it should.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908080 13f79535-47bb-0310-9956-ffa450edef68
2023-03-05 09:59:34 +00:00
6c9b8075bc Sync changes [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907983 13f79535-47bb-0310-9956-ffa450edef68
2023-03-02 15:24:08 +00:00
0df5879df8 mod_proxy_uwsgi: Stricter backend HTTP response parsing/validation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907980 13f79535-47bb-0310-9956-ffa450edef68
2023-03-02 15:10:30 +00:00
be5fb2ef25 Follow up to r1907972: CHANGES entry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907977 13f79535-47bb-0310-9956-ffa450edef68
2023-03-02 15:03:20 +00:00
ff6b8026ac *) mod_http2: new directive 'H2MaxDataFrameLen n' to limit the maximum
amount of response body bytes put into a single HTTP/2 DATA frame.
     Setting this to 0 places no limit (but the max size allowed by the
     protocol is observed).
     The module, by default, tries to use the maximum size possible, which is
     somewhat around 16KB. This sets the maximum. When less response data is
     available, smaller frames will be sent.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907697 13f79535-47bb-0310-9956-ffa450edef68
2023-02-16 11:58:45 +00:00
b2d18fb704 LDAPConnectionPoolTTL should accept negative values in order to allow
connections of any age to be reused. Up to now, a negative value was handled
as an error when parsing the configuration file.  PR 66421.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907024 13f79535-47bb-0310-9956-ffa450edef68
2023-01-27 12:58:32 +00:00
296a99c310 * Report an error if the AJP backend sends an invalid number of headers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906940 13f79535-47bb-0310-9956-ffa450edef68
2023-01-23 08:59:14 +00:00
a829ac7f3f *) mod_http2: client resets of HTTP/2 streams led to unwanted 500 errors
reported in access logs and error documents. The processing of the
     reset was correct, only unneccesary reporting was caused.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906775 13f79535-47bb-0310-9956-ffa450edef68
2023-01-18 20:02:25 +00:00
d0eac89e98 add -T flag to truncate rotated logs only
for strftime formats that will loop back on themselves, like
day of month or weekday name.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906433 13f79535-47bb-0310-9956-ffa450edef68
2023-01-06 23:46:35 +00:00
05297d7b00 Use 'command -v' instead of 'which' which is more portable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906387 13f79535-47bb-0310-9956-ffa450edef68
2023-01-04 13:42:35 +00:00
47a3f2329c * Add CHANGELOG for r1906379, r1906380
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906382 13f79535-47bb-0310-9956-ffa450edef68
2023-01-04 12:49:54 +00:00
be39909cf3 *) mod_proxy_http2: apply the standard httpd content type handling
to responses from the backend, as other proxy modules do. Fixes PR 66391.
     Thanks to Jérôme Billiras for providing the patch.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906051 13f79535-47bb-0310-9956-ffa450edef68
2022-12-17 10:21:56 +00:00
ccf9197926 Add a change entry for r1905229
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1905404 13f79535-47bb-0310-9956-ffa450edef68
2022-11-19 16:00:03 +00:00
8b68438b2e *) mod_http2: field values (headers and trailers) are stripped of
leading/trailing whitespace (space +htab) before being processed
     or send in a response. This is compatible behaviour to HTTP/1.1
     parsers that strip incoming headers of such characters.
     [Stefan Eissing]

  - removed intermittent "H2HeaderStrictness" directive again.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1904777 13f79535-47bb-0310-9956-ffa450edef68
2022-10-22 11:41:55 +00:00
f02c7a9b8a 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
2022-10-17 09:48:11 +00:00
c74bf2f821 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
2022-10-11 09:53:04 +00:00
8476af1eb6 *) 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
2022-09-26 12:29:47 +00:00
4ef081eddf *) 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
2022-09-20 12:40:58 +00:00
f2b7303efa 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
2022-08-25 14:00:13 +00:00
3e835f22af *) 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
2022-08-01 12:56:11 +00:00
3f9a045f96 *) 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
2022-07-02 09:39:22 +00:00
63b5e4da31 Sync CHANGES [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901551 13f79535-47bb-0310-9956-ffa450edef68
2022-06-02 09:58:42 +00:00
9c65ecf6fe update of mod_md change description. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901546 13f79535-47bb-0310-9956-ffa450edef68
2022-06-02 09:18:17 +00:00
5af4eef2fd mod_ssl: SSLFIPS compatible with OpenSSL 3.0. PR 66063.
* modules/ssl/ssl_private.h():
  #define modssl_fips_is_enabled() and modssl_fips_enable() to wrap the
  native OpenSSL FIPS functions available on OPENSSL_VERSION_NUMBER.

* modules/ssl/ssl_engine_init.c(ssl_init_Module, modssl_fips_cleanup):
  Use the new wrappers instead of the OPENSSL_VERSION_NUMBER < 3.0 functions.


Submitted by: Petr Sumbera <petr.sumbera oracle.com>, ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901470 13f79535-47bb-0310-9956-ffa450edef68
2022-05-31 23:01:24 +00:00
9a8214d08f mod_proxy_http: Avoid 417 responses for non forwardable 100-continue. PR 65666.
Stop returning 417 when mod_proxy has to forward an HTTP/1.1 request with both
"Expect: 100-continue" and "force-proxy-request-1.0" set, mod_proxy can instead
handle the 100-continue by itself before forwarding the request, like in the
"Proxy100Continue Off" case.

Note that this does not change the behaviour of httpd receiving an HTTP/1.0
request with an Expect header, ap_check_request_header() will still correctly
return 417 in this case.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901420 13f79535-47bb-0310-9956-ffa450edef68
2022-05-30 15:54:34 +00:00
f4230a5e7d Merge of PR 318:
*) core: the conf/mime.types has been updated in conformance with RFC 9239:
     - .js moved from 'application/javascript' to 'text/javascript'
     - .mjs was added as 'text/javascript'
     [Mathias Bynens <@mathiasbynens> via PR 318]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901273 13f79535-47bb-0310-9956-ffa450edef68
2022-05-26 08:43:13 +00:00
75594f2d4a *) mod_md: a logic bug in sending long OCSP HTTP request bodies was fixed.
This did not happen in normal use as request sizes for OSCP queries
     never exceed that length.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901230 13f79535-47bb-0310-9956-ffa450edef68
2022-05-25 11:32:52 +00:00
0f4842ef5a Sync CHANGES entries [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1901034 13f79535-47bb-0310-9956-ffa450edef68
2022-05-18 12:44:41 +00:00
33a129a042 Follow up to r1899858: CHANGES entry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900991 13f79535-47bb-0310-9956-ffa450edef68
2022-05-17 15:16:43 +00:00
e6e83f275f *) mod_md: the MDCertificateAuthority directive can take more than one URL/name of
an ACME CA. This gives a failover for renewals when several consecutive attempts
     to get a certificate failed.
     A new directive was added: `MDRetryDelay` sets the delay of retries.
     A new directive was added: `MDRetryFailover` sets the number of errored
     attempts before an alternate CA is selected for certificate renewals.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900852 13f79535-47bb-0310-9956-ffa450edef68
2022-05-13 11:03:51 +00:00
2115b29968 *) mod_md: fixed a bug leading to failed transfers for OCSP
stapling information when more than 6 certificates needed
     updates in the same run.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900628 13f79535-47bb-0310-9956-ffa450edef68
2022-05-06 13:09:46 +00:00
57e8cb5846 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
2022-04-28 13:57:15 +00:00
cc894406d8 *) 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
2022-04-28 10:41:48 +00:00
0c5f62a212 * removing duplicatae changes entry
[skip ci]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900315 13f79535-47bb-0310-9956-ffa450edef68
2022-04-27 12:07:18 +00:00
e247d79298 *) 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
2022-04-27 11:53:04 +00:00
6b5e7d4588 *) 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
2022-04-27 11:48:36 +00:00
499a90a672 * 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
2022-04-27 06:43:11 +00:00
e2e1d77917 * Avoid an overflow on large inputs
PR: 66033


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900306 13f79535-47bb-0310-9956-ffa450edef68
2022-04-27 06:35:02 +00:00
63840edb44 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
2022-04-22 13:04:51 +00:00
533a895c1f *) 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
2022-04-22 08:45:31 +00:00
567a50205f 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
2022-04-21 10:02:29 +00:00
80795a9ae2 * 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
2022-04-19 14:11:39 +00:00
2d4d303201 *) 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
2022-04-19 09:14:10 +00:00
6a0896d693 *) 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
2022-04-19 08:59:47 +00:00
716d664f7d * 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
2022-04-15 11:42:58 +00:00
5d3b2f1f0c *) 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
2022-04-13 08:38:12 +00:00
fbb84e00fa 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
2022-04-13 07:40:17 +00:00
d150ca6f4e 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
2022-04-12 17:43:20 +00:00
0296d7dfea *) 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
2022-04-07 10:41:46 +00:00
a4ea0e7799 *) core: make ap_escape_quotes() work correctly on strings
with more than MAX_INT/2 characters, counting quotes double.
     Credit to <generalbugs@zippenhop.com> for finding this.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899609 13f79535-47bb-0310-9956-ffa450edef68
2022-04-06 09:17:42 +00:00