]> git.ipfire.org Git - thirdparty/apache/httpd.git/log
thirdparty/apache/httpd.git
3 years agomod_proxy: Handle ap_proxy_buckets_lifetime_transform() errors.
Yann Ylavic [Fri, 24 Sep 2021 11:25:42 +0000 (11:25 +0000)] 
mod_proxy: Handle ap_proxy_buckets_lifetime_transform() errors.

* modules/proxy/mod_proxy.h,modules/proxy/proxy_util.c:
  Add ap_proxy_fill_error_brigade() to factorize proxy error handling
  on the client connection side.

* modules/proxy/mod_proxy_{http,ajp,uwsgi}.c:
  Use ap_proxy_fill_error_brigade() where needed, including when an
  empty brigade is returned on the backend side or when calling
  ap_proxy_buckets_lifetime_transform fails.

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

3 years agomod_proxy: Restore ap_proxy_transfer_between_connections().
Yann Ylavic [Fri, 24 Sep 2021 10:27:16 +0000 (10:27 +0000)] 
mod_proxy: Restore ap_proxy_transfer_between_connections().

* modules/proxy/mod_proxy.h:
  Restore the interface of ap_proxy_transfer_between_connections() back to
  before MMN 20210506.0.
  Add ap_proxy_tunnel_conn_bytes_in() and ap_proxy_tunnel_conn_bytes_out().
  New proxy_tunnel_conn_t typedef'ed from opaque struct proxy_tunnel_conn.

* modules/proxy/mod_proxy.h(ap_proxy_tunnel_conn_get_read,
                            ap_proxy_tunnel_conn_get_transferred):
  Axed/replaced by ap_proxy_tunnel_conn_bytes_in() and
  ap_proxy_tunnel_conn_bytes_out().

* modules/proxy/proxy_util.c(struct proxy_tunnel_conn):
  Replace "exchanged" by "bytes_in" and "bytes_out".

* modules/proxy/proxy_util.c(proxy_transfer):
  New helper implementing ap_proxy_transfer_between_connections() and
  returning both &bytes_in and &bytes_out.

* modules/proxy/proxy_util.c(ap_proxy_transfer_between_connections):
  Now calls proxy_transfer().

* modules/proxy/proxy_util.c(ap_proxy_tunnel_conn_bytes_in,
                             ap_proxy_tunnel_conn_bytes_out):
  Return tc->bytes_in and tc->bytes_out respectively.

* modules/proxy/proxy_util.c(proxy_tunnel_forward):
  Use proxy_transfer() which updates in->bytes_in, &out->bytes_out.
  tunnel->replied will be updated in proxy_tunnel_run().

* modules/proxy/proxy_util.c(proxy_tunnel_forward):
  Fall through the "done" label in any case to set tunnel->replied based
  on tunnel->client->bytes_out > 0.

* modules/proxy/mod_proxy_http.c(ap_proxy_http_process_response):
  Use ap_proxy_tunnel_conn_bytes_{in,out}() for worker->s->{read,transferred}
  accounting.

* modules/proxy/mod_proxy_http.c(proxy_http_async_finish):
  Update worker->s->{read,transferred} when async too.

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

3 years agomod_proxy: typedef struct proxy_tunnel_conn proxy_tunnel_conn_t.
Yann Ylavic [Fri, 24 Sep 2021 10:09:23 +0000 (10:09 +0000)] 
mod_proxy: typedef struct proxy_tunnel_conn proxy_tunnel_conn_t.

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

3 years ago* Update CHANGES [skip ci]
Ruediger Pluem [Fri, 24 Sep 2021 06:45:09 +0000 (06:45 +0000)] 
* Update CHANGES [skip ci]

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

3 years ago* Correctly handle errors returned by dav providers on REPORT requests.
Ruediger Pluem [Fri, 24 Sep 2021 06:42:04 +0000 (06:42 +0000)] 
* Correctly handle errors returned by dav providers on REPORT requests.

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

3 years agoTentative update to reduce noise in travis log (i.e. tons of AH02637).
Christophe Jaillet [Thu, 23 Sep 2021 20:18:23 +0000 (20:18 +0000)] 
Tentative update to reduce noise in travis log (i.e. tons of AH02637).

Just switch 2 tests in 'dialup_handler()' when deciding to DECLINE something.

If mod_dialup is not configured, there is no need lo log anything about an
mpm that doesn't support something that is finally not used.

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

3 years agomod_http2: fixed speling error.
Stefan Eissing [Thu, 23 Sep 2021 13:54:05 +0000 (13:54 +0000)] 
mod_http2: fixed speling error.

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

3 years ago * mod_http2: fix version suffix after sync with github
Stefan Eissing [Thu, 23 Sep 2021 13:44:58 +0000 (13:44 +0000)] 
  * mod_http2: fix version suffix after sync with github
    Make shutdown worker wait loop robust against timed wait
    interruptions and report the correct seconds waited.

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

3 years ago* t/modules/http2.t is gone since 1893547. So do not use it any longer in
Ruediger Pluem [Thu, 23 Sep 2021 11:12:25 +0000 (11:12 +0000)] 
* t/modules/http2.t is gone since 1893547. So do not use it any longer in
  HTTP/2 tests and remove the dependency on Protocol::HTTP2::Client.
  Update test/travis_run_linux.sh to handle NO_TEST_FRAMEWORK.

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

3 years agomod_rewrite: Follow up to r1893519: Handle potential "unix://[authority]/".
Yann Ylavic [Thu, 23 Sep 2021 07:47:30 +0000 (07:47 +0000)] 
mod_rewrite: Follow up to r1893519: Handle potential "unix://[authority]/".

is_absolute_uri() should return the offset to the authority part, if any.

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

3 years ago* Correctly decrement active_daemons also in the case that the child
Ruediger Pluem [Wed, 22 Sep 2021 18:48:25 +0000 (18:48 +0000)] 
* Correctly decrement active_daemons also in the case that the child
  process decides on its own to die because of MaxRequestsPerChild.

PR: 65592

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

3 years agomod_proxy: Handle UDS URIs with empty hostname as if they had no hostname.
Yann Ylavic [Wed, 22 Sep 2021 18:47:09 +0000 (18:47 +0000)] 
mod_proxy: Handle UDS URIs with empty hostname as if they had no hostname.

It was reported to me (privately) that r1893101 broke existing settings like:
  SetHandler "proxy:unix:///path/to/uds.sock|fcgi://localhost/"

RFC 3986 (section 3.2.2) says that:
   If the URI scheme defines a default for host, then that default
   applies when the host subcomponent is undefined or when the
   registered name is empty (zero length).  For example, the "file" URI
   scheme is defined so that no authority, an empty host, and
   "localhost" all mean the end-user's machine, whereas the "http"
   scheme considers a missing authority or empty host invalid.

Let's consider that the "unix" scheme is closer to the "file" scheme than
the "http" one, and accept "unix:///path/to/uds.sock" as a valid URI.

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

3 years agomod_rewrite: Fix UDS ("unix:") scheme for [P] rules. PR 57691 + 65590.
Yann Ylavic [Wed, 22 Sep 2021 18:16:38 +0000 (18:16 +0000)] 
mod_rewrite: Fix UDS ("unix:") scheme for [P] rules.  PR 57691 + 65590.

Handle the unix: scheme as an obsolute URI or a rule like:
  RewriteRule ^/(.*) unix:/path/to/uds.sock|fcgi://localhost/$1 [P]
sets r->filename for /index.html as:
  proxy:http://www.example.com/unix:/path/to/uds.sock|http://localhost/index.html
instead of the expected:
  proxy:unix:/path/to/uds.sock|http://localhost/index.html

Submitted by: Janne Peltonen <janne.peltonen sange.fi>
Reviewed by: ylavic

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

3 years ago* Add change entry for r1893497 [skip ci]
Ruediger Pluem [Wed, 22 Sep 2021 07:02:28 +0000 (07:02 +0000)] 
* Add change entry for r1893497 [skip ci]

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

3 years agomod_optional_hook_import: debug message at APLOG_DEBUG level.
Yann Ylavic [Tue, 21 Sep 2021 21:16:20 +0000 (21:16 +0000)] 
mod_optional_hook_import: debug message at APLOG_DEBUG level.

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

3 years ago* Follow up to r1893497: Make use of ap_pre_connection in mpm_motorz and mpm_simple_io
Ruediger Pluem [Tue, 21 Sep 2021 20:05:05 +0000 (20:05 +0000)] 
* Follow up to r1893497: Make use of ap_pre_connection in mpm_motorz and mpm_simple_io

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

3 years agoIn case one of the pre_connection hooks causes the hook run to stop by an error
Ruediger Pluem [Tue, 21 Sep 2021 20:03:52 +0000 (20:03 +0000)] 
In case one of the pre_connection hooks causes the hook run to stop by an error
the pre_connection hook of the core module maybe did not run
(it is APR_HOOK_REALLY_LAST) and hence we missed to

- Put the socket in c->conn_config
- Setup core output and input filters
- Set socket options and timeouts

For calls of ap_run_pre_connection where this matters create a wrapper named
ap_pre_connection that ensures that this happens.

* include/ap_mmn.h: Bump minor version as we added new ap_pre_connection
  function.

* include/http_connection.h: Declare ap_pre_connection prototype.

* server/connection.c: Make use of ap_pre_connection in ap_process_connection.

* server/core.c: Implement ap_pre_connection.

* server/mpm/event/event.c: Make use of ap_pre_connection.

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

3 years agoNo nullglob with ls..
Yann Ylavic [Mon, 20 Sep 2021 18:04:22 +0000 (18:04 +0000)] 
No nullglob with ls..

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

3 years agomod_example_hooks, mod_optional_fn_export: debug messages at APLOG_DEBUG level
Yann Ylavic [Mon, 20 Sep 2021 17:51:21 +0000 (17:51 +0000)] 
mod_example_hooks, mod_optional_fn_export: debug messages at APLOG_DEBUG level

Switch from APLOG_NOTICE/ERR to APLOG_DEBUG to avoid filling the logs.

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

3 years agoMore of test -n wants a single argument.
Yann Ylavic [Mon, 20 Sep 2021 16:52:48 +0000 (16:52 +0000)] 
More of test -n wants a single argument.

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

3 years agotest -n wants a single argument.
Yann Ylavic [Mon, 20 Sep 2021 15:08:32 +0000 (15:08 +0000)] 
test -n wants a single argument.

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

3 years agoMPMs: cap idle_spawn_rate to MAX_SPAWN_RATE.
Yann Ylavic [Mon, 20 Sep 2021 14:27:42 +0000 (14:27 +0000)] 
MPMs: cap idle_spawn_rate to MAX_SPAWN_RATE.

idle_spawn_rate *= 2 can go above MAX_SPAWN_RATE at some point, and it's not
enough for MAX_SPAWN_RATE to be a power of two for MPMs event and worker since
idle_spawn_rate is per bucket (num_buckets is not necessarily a power of two).

Let's cap on the other MPMs too should MAX_SPAWN_RATE change in the future.

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

3 years agoci: show >debug logs only.
Yann Ylavic [Sat, 18 Sep 2021 11:25:00 +0000 (11:25 +0000)] 
ci: show >debug logs only.

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

3 years agoTrigger ci.
Yann Ylavic [Sat, 18 Sep 2021 11:16:18 +0000 (11:16 +0000)] 
Trigger ci.

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

3 years agoci: show non-traceX logs only.
Yann Ylavic [Sat, 18 Sep 2021 10:59:35 +0000 (10:59 +0000)] 
ci: show non-traceX logs only.

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

3 years agoci: print error_log on perl-framework failure.
Yann Ylavic [Sat, 18 Sep 2021 10:47:06 +0000 (10:47 +0000)] 
ci: print error_log on perl-framework failure.

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

3 years ago *) mod_md: when MDMessageCmd for a 'challenge-setup:<type>:<dnsname>'
Stefan Eissing [Fri, 17 Sep 2021 12:18:41 +0000 (12:18 +0000)] 
  *) mod_md: when MDMessageCmd for a 'challenge-setup:<type>:<dnsname>'
     fails (!= 0 exit), the renewal process is aborted and an error is
     reported for the MDomain. This provides scripts that distribute
     information in a cluster to abort early with bothering an ACME
     server to validate a dns name that will not work. The common
     retry logic will make another attempt in the future, as with
     other failures.
     Fixed a bug when adding private key specs to an already working
     MDomain, see <https://github.com/icing/mod_md/issues/260>.

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

3 years ago *) mod_md: fixed a bug in handling multiple parallel OCSP requests. These could
Stefan Eissing [Wed, 15 Sep 2021 13:22:27 +0000 (13:22 +0000)] 
  *) mod_md: fixed a bug in handling multiple parallel OCSP requests. These could
     run into an assertion which terminated (and restarted) the child process where
     the task was running. Eventually, all OCSP responses were collected, but not
     in the way that things are supposed to work.
     See also <https://bz.apache.org/bugzilla/show_bug.cgi?id=65567>.
     The bug was possibly triggered when more than one OCSP status needed updating
     at the same time. For example for several renewed certificates after a server
     reload.

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

3 years ago* Log the correct timeout
Ruediger Pluem [Tue, 14 Sep 2021 08:58:55 +0000 (08:58 +0000)] 
* Log the correct timeout

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

3 years agofix time-of-use vs time-of-check
Ruediger Pluem [Tue, 14 Sep 2021 06:56:21 +0000 (06:56 +0000)] 
fix time-of-use vs time-of-check
fix time-of-use time-of-check bugs

Submitted by: kokke <spam@rowdy.dk>

Github: closes #266

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

3 years ago * adding tests to verfiy header field name length checks
Stefan Eissing [Mon, 13 Sep 2021 10:27:22 +0000 (10:27 +0000)] 
 * adding tests to verfiy header field name length checks

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

3 years agofr doc rebuild
Lucien Gentis [Sat, 11 Sep 2021 12:41:29 +0000 (12:41 +0000)] 
fr doc rebuild

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

3 years agofr doc XML file update.
Lucien Gentis [Sat, 11 Sep 2021 12:40:23 +0000 (12:40 +0000)] 
fr doc XML file update.

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

3 years agomake the test work with LibreSSL
Giovanni Bechis [Fri, 10 Sep 2021 10:28:21 +0000 (10:28 +0000)] 
make the test work with LibreSSL

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

3 years ago * Switch to using OpenSSL EVP_* API to avoid deprecation warnings with
Stefan Eissing [Fri, 10 Sep 2021 09:46:05 +0000 (09:46 +0000)] 
  * Switch to using OpenSSL EVP_* API to avoid deprecation warnings with
   OpenSSL 3.0. [@notroj]

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

3 years agoformatting change entry [skip ci]
Stefan Eissing [Fri, 10 Sep 2021 08:18:32 +0000 (08:18 +0000)] 
formatting change entry [skip ci]

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

3 years ago * mod_http2: when a server is restarted gracefully, any idle h2 worker
Stefan Eissing [Fri, 10 Sep 2021 08:14:48 +0000 (08:14 +0000)] 
  * mod_http2: when a server is restarted gracefully, any idle h2 worker
    threads are shut down immediately. [Stefan Eissing]

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

3 years agocore: Add ap_create_connection() to create a server or client/proxy connection.
Yann Ylavic [Thu, 9 Sep 2021 16:55:24 +0000 (16:55 +0000)] 
core: Add ap_create_connection() to create a server or client/proxy connection.

c->outgoing shouldn't be set by mod_ssl, ap_create_connection() allows that
and this commit also replaces all the calls to ap_run_create_connection() in
mod_proxy modules (not in the MPMs which create incoming connections only).

* include/http_connection.h, server/connection.c:
  Declare and implement ap_create_connection().

* modules/proxy/proxy_util.c, modules/proxy/mod_proxy_connect.c,
  modules/proxy/mod_proxy_ftp.c:
  Use ap_create_connection() instead of ap_run_create_connection(), and don't
  provide a connection_id a scoreboard handle for outgoing connection.

* server/log.c(do_errorlog_default):
  Use c->outgoing instead of c->sbh to determine if it's a "client" or "remote"
  connection.

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

3 years ago * optimizing hook check as suggested by Yann.
Stefan Eissing [Thu, 9 Sep 2021 14:42:48 +0000 (14:42 +0000)] 
 * optimizing hook check as suggested by Yann.

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

3 years ago *core: clarify comments and use hook API better to check for presence of callbacks.
Stefan Eissing [Thu, 9 Sep 2021 07:06:00 +0000 (07:06 +0000)] 
  *core: clarify comments and use hook API better to check for presence of callbacks.

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

3 years agompm_event: Follow up to r1893014: log when children are not spawned.
Yann Ylavic [Tue, 7 Sep 2021 20:13:42 +0000 (20:13 +0000)] 
mpm_event: Follow up to r1893014: log when children are not spawned.

Log at trace5 level when active_daemons >= active_daemons_limit and we won't
spawn children. Reset free_length to avoid negative value in this case too.

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

3 years agoSync CHANGES [skip ci].
Yann Ylavic [Tue, 7 Sep 2021 15:29:23 +0000 (15:29 +0000)] 
Sync CHANGES [skip ci].

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

3 years agocore: Follow up to r1893030: Use special address for invalid r->method.
Yann Ylavic [Tue, 7 Sep 2021 14:42:15 +0000 (14:42 +0000)] 
core: Follow up to r1893030: Use special address for invalid r->method.

read_request_line() failure was cought by ap_parse_request() with r->method
being NULL, so have a .rodata pointer to "-" instead.

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

3 years agocore: Initialize the request fields on read failure to avoid NULLs.
Yann Ylavic [Tue, 7 Sep 2021 13:09:07 +0000 (13:09 +0000)] 
core: Initialize the request fields on read failure to avoid NULLs.

* server/protocol.c(read_request_line):
  Set r->method_number to M_INVALID and r->{method,uri,unparsed_uri} to "-"
  when read fails, ap_parse_request_line() will never be called.

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

3 years agoRevert r1893026, will re-commit with minimal changes to ease backport.
Yann Ylavic [Tue, 7 Sep 2021 13:05:22 +0000 (13:05 +0000)] 
Revert r1893026, will re-commit with minimal changes to ease backport.

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

3 years agocore: Initialize the request fields on read failure to avoid NULLs.
Yann Ylavic [Tue, 7 Sep 2021 13:00:06 +0000 (13:00 +0000)] 
core: Initialize the request fields on read failure to avoid NULLs.

* server/protocol.c(read_request_line):
  Set r->method_number to M_INVALID and r->{method,uri,unparsed_uri} to "-"
  when read fails, ap_parse_request_line() will never be called.

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

3 years agomod_proxy: Don't canonicalize with both nocanon and ProxyPassInterpolateEnv On.
Yann Ylavic [Tue, 7 Sep 2021 10:16:03 +0000 (10:16 +0000)] 
mod_proxy: Don't canonicalize with both nocanon and ProxyPassInterpolateEnv On.

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

Submitted by: Joel Self <joelself gmail.com>

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

3 years agompm_event: Fix children processes possibly not stopped on graceful restart.
Yann Ylavic [Tue, 7 Sep 2021 09:34:09 +0000 (09:34 +0000)] 
mpm_event: Fix children processes possibly not stopped on graceful restart.

The number of children spawned can go above active_daemons_limit due to
exponential idle_spawn_rate growth (x 2), enforce the upper limit in
perform_idle_server_maintenance().  PR 63169.

Proposed by: Joel Self <joelself gmail.com>

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

3 years agotest/time-sem.c: unlock the accept mutex before exiting (error conditions).
Yann Ylavic [Tue, 7 Sep 2021 08:52:23 +0000 (08:52 +0000)] 
test/time-sem.c: unlock the accept mutex before exiting (error conditions).

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

3 years agomod_unique_id: Follow up to r1892915 and r1893002: Atomic counter.
Yann Ylavic [Tue, 7 Sep 2021 01:52:48 +0000 (01:52 +0000)] 
mod_unique_id: Follow up to r1892915 and r1893002: Atomic counter.

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

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

3 years agomod_unique_id: Follow up to r1892915: Shorter counter race condition yet.
Yann Ylavic [Tue, 7 Sep 2021 01:17:57 +0000 (01:17 +0000)] 
mod_unique_id: Follow up to r1892915: Shorter counter race condition yet.

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

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

3 years agocore: Set r->request_time before any logging, mod_unique_id needs it.
Yann Ylavic [Tue, 7 Sep 2021 01:09:23 +0000 (01:09 +0000)] 
core: Set r->request_time before any logging, mod_unique_id needs it.

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

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

3 years agomod_proxy: Follow up to r1892986: APLOGNO()
Yann Ylavic [Mon, 6 Sep 2021 11:21:49 +0000 (11:21 +0000)] 
mod_proxy: Follow up to r1892986: APLOGNO()

Stefan get out of this body! :)

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

3 years agomod_proxy: Follow up to r1892814.
Yann Ylavic [Mon, 6 Sep 2021 11:06:53 +0000 (11:06 +0000)] 
mod_proxy: Follow up to r1892814.

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

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

3 years agoFix a compilation error in the configuration where this is compiled.
Christophe Jaillet [Sun, 5 Sep 2021 08:31:04 +0000 (08:31 +0000)] 
Fix a compilation error in the configuration where this is compiled.

Unless I missed something, it is broken since r1516930 (Aug 23 2013).

So no-one has compiled this for more than 8 years.
Sounds like dead code.

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

3 years agoFix some typo and doxygen issues.
Christophe Jaillet [Sun, 5 Sep 2021 07:51:55 +0000 (07:51 +0000)] 
Fix some typo and doxygen issues.

s/and array/an array/
Missing 's' so that @param match the names of the parameters of the function

[skip ci]

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

3 years agoReduce the time window where duplicates may be generated by mod_uniqueid
Christophe Jaillet [Sun, 5 Sep 2021 05:58:57 +0000 (05:58 +0000)] 
Reduce the time window where duplicates may be generated by mod_uniqueid

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

3 years agoRevert r1887244 and r1887245 which causes issues on Windows
Christophe Jaillet [Sun, 5 Sep 2021 05:41:37 +0000 (05:41 +0000)] 
Revert r1887244 and r1887245 which causes issues on Windows

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

3 years agoAdd an alternate syntax for <!-- comment ... -->
Christophe Jaillet [Sat, 4 Sep 2021 17:19:35 +0000 (17:19 +0000)] 
Add an alternate syntax for <!-- comment ... -->
PR 65546

[skip ci]

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

3 years agoSync CHANGES [skip ci].
Yann Ylavic [Fri, 3 Sep 2021 17:07:37 +0000 (17:07 +0000)] 
Sync CHANGES [skip ci].

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

3 years agomod_proxy: Follow up to r1892814.
Yann Ylavic [Fri, 3 Sep 2021 11:36:44 +0000 (11:36 +0000)] 
mod_proxy: Follow up to r1892814.

Save some few cycles in ap_proxy_de_socketfy() too.

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

3 years agomod_proxy: Follow up to r1892740.
Yann Ylavic [Fri, 3 Sep 2021 11:08:16 +0000 (11:08 +0000)] 
mod_proxy: Follow up to r1892740.

Really remove the old ap_filter_input_pending() handling forgotten by r1892740.

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

3 years agoSecond attempt at updating the Travis conditions to work properly
Joe Orton [Fri, 3 Sep 2021 08:31:42 +0000 (08:31 +0000)] 
Second attempt at updating the Travis conditions to work properly
for candidate-2.4.x branches, and add a mini test script for the
conditions.

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

3 years agoAdjust Travis conditions for candidate-2.4.x tags.
Joe Orton [Fri, 3 Sep 2021 07:54:03 +0000 (07:54 +0000)] 
Adjust Travis conditions for candidate-2.4.x tags.

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

3 years agomod_proxy: Faster unix socket path parsing in the "proxy:" URL.
Yann Ylavic [Thu, 2 Sep 2021 12:37:02 +0000 (12:37 +0000)] 
mod_proxy: Faster unix socket path parsing in the "proxy:" URL.

The actual r->filename format is "[proxy:]unix:path|url" for UDS, no need to
strstr(,"unix:") since it's at the start of the string.

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

3 years agomod_proxy_uwsgi: Fix PATH_INFO setting for generic worker.
Yann Ylavic [Thu, 2 Sep 2021 09:53:43 +0000 (09:53 +0000)] 
mod_proxy_uwsgi: Fix PATH_INFO setting for generic worker.

When the generic "proxy:reverse" worker is selected for an uwsgi scheme, the
worker name is irrelevant so uwscgi_handler() should point to the PATH_INFO
directly from the given URL.

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

3 years agomod_md:
Stefan Eissing [Wed, 1 Sep 2021 13:16:03 +0000 (13:16 +0000)] 
mod_md:
 * Certificate/keys pairs are verified as matching before a renewal is accepted
   as successful or a staged renewal is replacing the existing certificates.
   This avoid potential mess ups in the md store file system to render the active
   certificates non-working. [@mkauf]

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

3 years agomod_proxy: Fix potential tunneling infinite loop and spurious timeout.
Yann Ylavic [Mon, 30 Aug 2021 18:04:20 +0000 (18:04 +0000)] 
mod_proxy: Fix potential tunneling infinite loop and spurious timeout.
           PRs 65521 and 65519.

* modules/proxy/proxy_util.c(ap_proxy_tunnel_run):
  Avoid an infinite loop by shutting down the connection for write when poll()
  returns POLLHUP and read is already down.  PR 65521.

* modules/proxy/proxy_util.c(ap_proxy_tunnel_run):
  When write completion is finished don't check for ap_filter_input_pending()
  before proxy_tunnel_forward() to flush input data, this is a nonblocking read
  already which will do the same thing implicitely. ap_filter_input_pending()
  is broken in 2.4.x without the whole pending data mechanism (not backported
  yet), so let's align here.  PR 65519.

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

3 years agoSync CHANGES entries [skip ci].
Yann Ylavic [Mon, 30 Aug 2021 17:05:13 +0000 (17:05 +0000)] 
Sync CHANGES entries [skip ci].

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

3 years ago * mod_deflate: refrain from reading buckets of known length, just
Stefan Eissing [Mon, 30 Aug 2021 10:05:06 +0000 (10:05 +0000)] 
 * mod_deflate: refrain from reading buckets of known length, just
   to get their length. This may transform buckets unwanted (e.g. file
   to mmap) and prevent optimization down the filter chain.

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

3 years agoAdd HTTP/2 test job to Travis configuration.
Joe Orton [Thu, 26 Aug 2021 14:41:46 +0000 (14:41 +0000)] 
Add HTTP/2 test job to Travis configuration.

Github: closes #262

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

3 years agotest/modules/http2:
Stefan Eissing [Thu, 26 Aug 2021 11:10:06 +0000 (11:10 +0000)] 
test/modules/http2:
  * removing unneeded python imports for smaller footprint
  * fixing bug in waiting for stopped server to no longer
    accept new connections.

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

3 years agomod_http2: fixes a use-after-read of an integer value when
Stefan Eissing [Wed, 25 Aug 2021 14:59:03 +0000 (14:59 +0000)] 
mod_http2: fixes a use-after-read of an integer value when
   passing a stream identifier for further IO checking. A
   non-issue since an int value matching no active stream
   will lead to no action.

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

3 years ago * test/modules/http2: using stop/start instead of reload when changing apache configs
Stefan Eissing [Wed, 25 Aug 2021 14:31:12 +0000 (14:31 +0000)] 
 * test/modules/http2: using stop/start instead of reload when changing apache configs
   to give reliable results. The new reload behaviour keeps old children around until
   very late and may answer on old configurations.

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

3 years agompm_{event,worker,prefork}: follow up to r1892587: restore ungraceful on MPM change.
Yann Ylavic [Wed, 25 Aug 2021 09:43:59 +0000 (09:43 +0000)] 
mpm_{event,worker,prefork}: follow up to r1892587: restore ungraceful on MPM change.

While at it add a comment for the rationale, including for MPM motorz.

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

3 years agompm_{event,worker,prefork}: late stop of children processes on restart.
Yann Ylavic [Tue, 24 Aug 2021 22:22:40 +0000 (22:22 +0000)] 
mpm_{event,worker,prefork}: late stop of children processes on restart.

Change how the main process handles restarts, from:
    0. <restart signal>
    1. stop old generation of children processes (graceful or not)
    2. reload new configuration
    3. start new generation of children processes
to:
    0. <restart signal>
    1. reload new configuration
    2. stop old generation of children processes (graceful or not)
    3. start new generation of children processes

The delay between stop and start is now very short and does not depend on the
reload time (which can be quite long with many vhosts and/or complex setups
with regexps or whatever third party components to compile).

Also, while reloading, the old generation of children processes keeps accepting
and handling incoming connections until the new generation is up to take over.

* os/unix/unixd.c (sig_term, sig_restart):
  Set AP_MPMQ_STOPPING only once.

* server/listen.c (ap_duplicate_listeners):
  Use ap_log_error() the main server instead of ap_log_perror().

* server/mpm/{event,worker,prefork}/{event,worker,prefork}.c
    ({event,worker,prefork}_retained_data):
  Save the generation pool pointer (gen_pool) and all the buckets here, they
  won't be cleared before the reload like pconf so they need a persitent
  storage accross restarts (i.e. retained->gen_pool).

* server/mpm/{event,worker,prefork}/{event,worker,prefork}.c
    (perform_idle_server_maintenance, child_main, make_child):
  Change usage of all_buckets (previously with global/static scope) to the new
  retained->buckets array.

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

3 years agomod_proxy_http: Avoid a double call to apr_table_get().
Yann Ylavic [Tue, 24 Aug 2021 09:31:16 +0000 (09:31 +0000)] 
mod_proxy_http: Avoid a double call to apr_table_get().

* modules/proxy/mod_proxy_http.c (ap_proxy_http_process_response):
  Save a call to apr_table_get(r->headers_out, "Transfer-Encoding").

No functional change.

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

3 years agoUse apxs from the configured @bindir@ rather than
Joe Orton [Mon, 23 Aug 2021 12:32:40 +0000 (12:32 +0000)] 
Use apxs from the configured @bindir@ rather than
whatever path APR happens to be pulled from.  [skip ci]

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

3 years ago * modules.conf is now build from a list of desired modules
Stefan Eissing [Mon, 23 Aug 2021 10:51:12 +0000 (10:51 +0000)] 
 * modules.conf is now build from a list of desired modules
   found in the file system. This accomodates builds that bind
   certain modules statically.

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

4 years agofr doc rebuild.
Lucien Gentis [Sat, 21 Aug 2021 14:17:36 +0000 (14:17 +0000)] 
fr doc rebuild.

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

4 years agofr doc XML file update.
Lucien Gentis [Sat, 21 Aug 2021 14:16:23 +0000 (14:16 +0000)] 
fr doc XML file update.

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

4 years ago * test/module/http2: test suite from github mod_h2 repository
Stefan Eissing [Fri, 20 Aug 2021 16:07:44 +0000 (16:07 +0000)] 
 * test/module/http2: test suite from github mod_h2 repository
   slightly adapted to run in a source build. usage:
   > make install  # to have httpd, apxs etc. in place
   > cd test
   > pytest

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

4 years agocore: follow up to r1891148: WC bucket defaulting to FLUSH bucket.
Yann Ylavic [Fri, 20 Aug 2021 09:36:19 +0000 (09:36 +0000)] 
core: follow up to r1891148: WC bucket defaulting to FLUSH bucket.

Define WC bucket semantics as:
/**
 * @brief Write Completion (WC) bucket
 *
 * A WC bucket is a FLUSH bucket with special ->data == &ap_bucket_wc_data,
 * still both AP_BUCKET_IS_WC() and APR_BUCKET_IS_FLUSH() hold for them so
 * they have the same semantics for most filters, namely:
 *   Everything produced before shall be passed to the next filter, including
 *   the WC/FLUSH bucket itself.
 * The distinction between WC and FLUSH buckets is only for filters that care
 * about write completion (calling ap_filter_reinstate_brigade() with non-NULL
 * flush_upto), those can setaside WC buckets and the preceding data provided
 * they have first determined that the next filter(s) have pending data
 * already, usually by calling ap_filter_should_yield(f->next).
 */

The only filters that care about write completion for now are
ap_core_output_filter() and ssl_io_filter_output(), which try to fill
in the pipe as much as possible, using ap_filter_reinstate_brigade(&flush_upto)
to determine whether they should flush (blocking) or setaside their remaining
data.

So ap_filter_reinstate_brigade() is made to not treat WC as FLUSH buckets and
keep the above filters working as before (and correctly w.r.t. above WC bucket
semantics).

* include/ap_mmn.h, include/util_filter.h:
  Axe specific ap_bucket_type_wc and define global &ap_bucket_wc_data address to
  mark WC buckets checked by AP_BUCKET_IS_WC().

* server/util_filter.c (ap_filter_reinstate_brigade):
  Don't treat WC buckets as FLUSH buckets.

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

4 years agocore: core ouput filter iovec vs brigade consistency assertion.
Yann Ylavic [Fri, 20 Aug 2021 09:10:55 +0000 (09:10 +0000)] 
core: core ouput filter iovec vs brigade consistency assertion.

* server/core_filters.c (writev_nonblocking):
  Assert that a bucket is always bound to the walked iovec.

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

4 years agocore: core output filter to cleanup empty/meta buckets following data, ASAP.
Yann Ylavic [Thu, 19 Aug 2021 16:04:45 +0000 (16:04 +0000)] 
core: core output filter to cleanup empty/meta buckets following data, ASAP.

* server/core_filters.c (delete_meta_bucket):
  Add delete_meta_bucket() helper to set r->flush on EOR.

* server/core_filters.c (send_brigade_nonblocking):
  Use delete_meta_bucket() to factorize code.

* server/core_filters.c (writev_nonblocking):
  Use delete_meta_bucket() to factorize code.
  Cleanup trailing empty/meta buckets immediately after data have been sent to
  get more accurate EOR timestamp (otherwise trailing buckets could be deleted
  only after the next data or with a final send_brigade_nonblocking() call in
  the output filter).

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

4 years agocore: don't break out iovec coalescing for metadata in ap_core_output_filter().
Yann Ylavic [Thu, 19 Aug 2021 13:43:23 +0000 (13:43 +0000)] 
core: don't break out iovec coalescing for metadata in ap_core_output_filter().

* server/core_filters.c (send_brigade_nonblocking):
  Keep filling in the iovec when the next bucket has no ->length.

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

4 years ago* Fix typo [skip ci]
Ruediger Pluem [Wed, 18 Aug 2021 15:01:24 +0000 (15:01 +0000)] 
* Fix typo [skip ci]

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

4 years ago* Remove unneeded checks to improve performance
Ruediger Pluem [Wed, 18 Aug 2021 14:53:14 +0000 (14:53 +0000)] 
* Remove unneeded checks to improve performance

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

4 years ago* Follow the same logic that is used for calculating the length
Ruediger Pluem [Wed, 18 Aug 2021 14:35:41 +0000 (14:35 +0000)] 
* Follow the same logic that is used for calculating the length

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

4 years ago* server/mpm_unix.c (ap_reclaim_child_processes, ap_relieve_child_processes):
Joe Orton [Wed, 18 Aug 2021 09:57:48 +0000 (09:57 +0000)] 
* server/mpm_unix.c (ap_reclaim_child_processes, ap_relieve_child_processes):
  Fix use after free warning with gcc -fanalyzer.

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

4 years agotolerate apr-1.5
Eric Covener [Wed, 11 Aug 2021 10:49:56 +0000 (10:49 +0000)] 
tolerate apr-1.5

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

4 years agoFollow up to 1892038, 1892063.
Christophe Jaillet [Tue, 10 Aug 2021 18:49:20 +0000 (18:49 +0000)] 
Follow up to 18920381892063.

Improve fix to please a fuzzer which reports:
   util.c:2713:26: runtime error: signed integer overflow:
   9999999999999999 * 1000 cannot be represented in type 'long'

Compute the maximum limit for each case 's', 'h', 'ms' and 'mi' and make sure that the input is below this value.

While at it, move a comment to make things more consistent and use 'apr_time_from_msec() instead of hand writing it.

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

4 years agoap_timeout_parameter_parse: axe unsigned < 0 check
Eric Covener [Sat, 7 Aug 2021 10:43:06 +0000 (10:43 +0000)] 
ap_timeout_parameter_parse: axe unsigned < 0 check

add check to see if the result was smaller than what we started with.
But the operative part is avoiding the UBI

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

4 years agofix int overflow in ap_timeout_parameter_parse
Eric Covener [Fri, 6 Aug 2021 13:10:45 +0000 (13:10 +0000)] 
fix int overflow in ap_timeout_parameter_parse

signed integer overflow in ap_timeout_parameter_parse under fuzzing

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

4 years agofix ap_escape_quotes with pre-escaped quotes
Eric Covener [Wed, 4 Aug 2021 11:48:38 +0000 (11:48 +0000)] 
fix ap_escape_quotes with pre-escaped quotes

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

4 years agoclarification/fixes around the replace() function
Eric Covener [Tue, 3 Aug 2021 18:29:35 +0000 (18:29 +0000)] 
clarification/fixes around the replace() function

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

4 years agoCorrected MODULE_MAGIC_NUMBER_MINOR.
Stefan Eissing [Sat, 31 Jul 2021 14:28:58 +0000 (14:28 +0000)] 
Corrected MODULE_MAGIC_NUMBER_MINOR.

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

4 years ago * core/mpm: add hook 'child_stopping` that gets called when the MPM is
Stefan Eissing [Sat, 31 Jul 2021 13:36:19 +0000 (13:36 +0000)] 
  * core/mpm: add hook 'child_stopping` that gets called when the MPM is
    stopping a child process. The additional `graceful` parameter allows
    registered hooks to free resources early during a graceful shutdown.

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

4 years agoSynch with trunk.
Christophe Jaillet [Wed, 28 Jul 2021 09:00:44 +0000 (09:00 +0000)] 
Synch with trunk.

Remove 2 useless lines which were left in-place when r1810016 has been forwarported in r1810017.

[skip ci]

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

4 years agoRemove trailing space to synch with 2.4.x
Christophe Jaillet [Wed, 28 Jul 2021 06:35:36 +0000 (06:35 +0000)] 
Remove trailing space to synch with 2.4.x

[skip ci]

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