apache-httpd.git
4 hours agoRemove problematic version check for OpenSSL < 1.0.2 trunk trunk
William A. Rowe Jr [Mon, 10 Aug 2020 20:12:00 +0000 (20:12 +0000)]
Remove problematic version check for OpenSSL < 1.0.2

This addresses several concerns;

- There is no valid release of OpenSSL < 1.0.2 to incorporate security fixes,
  particularly on Windows, and particularly as vetted by the project.
- File structure of opensslv.h has changed in such as a way as to completely
  invalidate the CMake FindOpenSSL macros, so 3.0.0 cannot be determined.

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

9 hours agoimprove Lua 5.4 handling
Giovanni Bechis [Mon, 10 Aug 2020 14:45:14 +0000 (14:45 +0000)]
improve Lua 5.4 handling

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

29 hours agofix quotes, simplify path, add a high port
Eric Covener [Sun, 9 Aug 2020 19:12:14 +0000 (19:12 +0000)]
fix quotes, simplify path, add a high port

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

31 hours agocover overlapp scenario which is straightfoward in trunk
Eric Covener [Sun, 9 Aug 2020 16:56:43 +0000 (16:56 +0000)]
cover overlapp scenario which is straightfoward in trunk

(as long you get it in the right order)

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

3 days agoSupport building against Lua 5.4 by adjusting to the 3-arg form of
Joe Orton [Fri, 7 Aug 2020 12:21:35 +0000 (12:21 +0000)]
Support building against Lua 5.4 by adjusting to the 3-arg form of
lua_resume().

* modules/lua/config.m4 (CHECK_LUA): Check for lua5.4 paths.

* modules/lua/mod_lua.c (lua_output_filter_handle,
  lua_input_filter_handle): Check that exactly one item is on the
  stack as indicated by lua_resume().

Submitted by: Lubos Uhliarik <luhliari redhat.com>, jorton
PR: 64591
Github: closes #130, closes #133, closes #134

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

5 days agoFail for more abort() errors in error_log.
Joe Orton [Wed, 5 Aug 2020 08:26:58 +0000 (08:26 +0000)]
Fail for more abort() errors in error_log.
Fail if a core dump is produced, and dump the backtrace if so.
(e.g. during parent or child process shutdown, core dumps will
not show up as test case failures so would not otherwise be caught)

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

6 days agoUpdate docs for SSLRandomSeed deprecation in r1877467. [skip ci]
Joe Orton [Tue, 4 Aug 2020 10:27:11 +0000 (10:27 +0000)]
Update docs for SSLRandomSeed deprecation in r1877467. [skip ci]

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

9 days agoThis not a hot path in RL use case, but looks to be one during testing with the test...
Christophe Jaillet [Sat, 1 Aug 2020 16:56:25 +0000 (16:56 +0000)]
This not a hot path in RL use case, but looks to be one during testing with the test framework.
Sso save a few cycles in this (unusual) use case.

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

9 days agoMerge 2 loops in order to save a few cycles.
Christophe Jaillet [Sat, 1 Aug 2020 11:46:50 +0000 (11:46 +0000)]
Merge 2 loops in order to save a few cycles.

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

9 days agoSimplify and speed-up ssl_io_data_dump().
Christophe Jaillet [Sat, 1 Aug 2020 10:42:57 +0000 (10:42 +0000)]
Simplify and speed-up ssl_io_data_dump().

Instead of using a temp buffer for each byte or char written, and calling
strlen over and over again to find the place where to copy this buffer,
write directly at the correct place in the final buffer, and take advantage
of 'apr_snprintf' returning the number of bytes copied.

This looks like a hot path when running the test framework (because of TRACE7), so it could be slighly useful in this use case :)

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

10 days agodon't try to load modules from a NULL path
Eric Covener [Fri, 31 Jul 2020 01:21:25 +0000 (01:21 +0000)]
don't try to load modules from a NULL path

ap_server_root_relative() can fail if apr_filepath_merge fails,
which can happen with a "bad" drive/volume or who knows what
else on Windows. Regardless, if !fullname we are already
going to retry wih what was actually passed.

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

11 days agoFor non-trunk run a simpler APLOGNO() test using grep which
Joe Orton [Thu, 30 Jul 2020 14:39:01 +0000 (14:39 +0000)]
For non-trunk run a simpler APLOGNO() test using grep which
only catches missing arguments, but this is better than nothing.

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

12 days agoUpdate some conditions. [skip ci]
Joe Orton [Wed, 29 Jul 2020 14:01:33 +0000 (14:01 +0000)]
Update some conditions. [skip ci]

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

12 days agoFix the condition_not_24x condition since it's now clear how 2.4 tagged builds look...
Joe Orton [Wed, 29 Jul 2020 13:08:51 +0000 (13:08 +0000)]
Fix the condition_not_24x condition since it's now clear how 2.4 tagged builds look like:

https://travis-ci.org/github/apache/httpd/jobs/712895950#L447

+: Travis tag = 2.4.44
+: Travis branch = 2.4.44

This should fix the false -ves which currently occur because
trunk-only tests are getting run for 2.4.x tags.

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

12 days agonot my day, it seems
Stefan Eissing [Wed, 29 Jul 2020 12:58:24 +0000 (12:58 +0000)]
not my day, it seems

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

12 days ago *) mod_http2: remote support for abandoned http-wg draft
Stefan Eissing [Wed, 29 Jul 2020 12:15:58 +0000 (12:15 +0000)]
  *) mod_http2: remote support for abandoned http-wg draft
     <https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/>.

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

13 days agouse .utf8 output
Eric Covener [Tue, 28 Jul 2020 11:21:32 +0000 (11:21 +0000)]
use .utf8 output

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

2 weeks agoFollow up to r1880205, APLOGNO().
Yann Ylavic [Thu, 23 Jul 2020 15:29:12 +0000 (15:29 +0000)]
Follow up to r1880205, APLOGNO().

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

2 weeks agomod_proxy_uwsgi: Error out on HTTP header larger than 16K
Yann Ylavic [Thu, 23 Jul 2020 14:09:50 +0000 (14:09 +0000)]
mod_proxy_uwsgi: Error out on HTTP header larger than 16K

The uwsgi protocol does not let us serialize more than 16K of HTTP header,
so fail early with 500 if it happens.

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

2 weeks agomod_proxy_http: follow up to r1879419.
Yann Ylavic [Thu, 23 Jul 2020 14:03:24 +0000 (14:03 +0000)]
mod_proxy_http: follow up to r1879419.

Better ap_proxy_tunnel_run() error handling.

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

2 weeks agomod_proxy: follow up to r1879401: call filters on tunnel POLLERR.
Yann Ylavic [Thu, 23 Jul 2020 12:00:04 +0000 (12:00 +0000)]
mod_proxy: follow up to r1879401: call filters on tunnel POLLERR.

proxy_util.c:
    Set POLLERR in reqevents for pollset providers that require it to detect
    socket errors (like select() based one).
    Call filters to read/write on POLLERR socket event, so that they know about
    the error by experiencing the failure. If no POLLIN|POLLOUT is returned
    with POLLERR (depending on the system or pollset provider), go with the
    requested read or write event handling.
    Restore ap_proxy_transfer_between_connections() so that it always tries to
    read first (i.e. move yielding conditions afterward).
    Add proxy_tunnel_forward() helper that calls transfer_between_connections()
    and handles errors pollset updates.
    Call proxy_tunnel_forward() when write completion finishes and there are
    pending input data.

mod_proxy.h:
    Add read_buf_size to proxy_tunnel_rec (trunk only, no MMN minor bump).

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

3 weeks agoAdd some features & API changes. [skip ci]
Joe Orton [Wed, 15 Jul 2020 14:53:05 +0000 (14:53 +0000)]
Add some features & API changes. [skip ci]

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

3 weeks agoThe cgid-fdpassing failures are fixed by r1879883 in test/framework,
Joe Orton [Wed, 15 Jul 2020 14:44:21 +0000 (14:44 +0000)]
The cgid-fdpassing failures are fixed by r1879883 in test/framework,
no longer mark as allowed_failure.  [skip ci]

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

3 weeks agomod_dav: Some DAV extensions, like CalDAV, specify both document
Graham Leggett [Wed, 15 Jul 2020 13:56:55 +0000 (13:56 +0000)]
mod_dav: Some DAV extensions, like CalDAV, specify both document
elements and property elements that need to be taken into account
when generating a property. The document element and property element
are made available in the dav_liveprop_elem structure under the
DAV_PROP_ELEMENT key in the resource pool.

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

3 weeks agomod_dav: Add utility functions dav_validate_root_ns(),
Graham Leggett [Wed, 15 Jul 2020 13:16:19 +0000 (13:16 +0000)]
mod_dav: Add utility functions dav_validate_root_ns(),
dav_find_child_ns(), dav_find_next_ns(), dav_find_attr_ns() and
dav_find_attr() so that other modules get to play too.

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

3 weeks agoAvoid NULL pointer dereferences for empty environment variable values
Ruediger Pluem [Wed, 15 Jul 2020 08:24:13 +0000 (08:24 +0000)]
Avoid NULL pointer dereferences for empty environment variable values

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

3 weeks ago* docs/log-message-tags/update-log-msg-tags: Exit with non-zero
Joe Orton [Wed, 15 Jul 2020 07:25:51 +0000 (07:25 +0000)]
* docs/log-message-tags/update-log-msg-tags: Exit with non-zero
  so inconsistent state is caught as a failure.

* test/README.travis: APLOGNO() sanity checking is done.

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

3 weeks ago* modules/generators/mod_cgid.c (get_cgi_pid): Fix test for pid=0.
Joe Orton [Tue, 14 Jul 2020 16:25:43 +0000 (16:25 +0000)]
* modules/generators/mod_cgid.c (get_cgi_pid): Fix test for pid=0.
  (cgid_handler): Remove duplicated test for pid=0 here added in
  r1879119.

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

4 weeks agoConsider case insensitive filessystems
Ruediger Pluem [Mon, 13 Jul 2020 18:47:34 +0000 (18:47 +0000)]
Consider case insensitive filessystems

Consider case insensitive filessystems and thus choose a new non conflicting
name for the directory to store CHANGES entries.

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

4 weeks ago *) mod_http2:
Stefan Eissing [Mon, 13 Jul 2020 15:36:53 +0000 (15:36 +0000)]
  *) mod_http2:
     Fixes <https://github.com/icing/mod_h2/issues/200>:
     "LimitRequestFields 0" now disables the limit, as documented.
     Fixes <https://github.com/icing/mod_h2/issues/201>:
     Do not count repeated headers with same name against the field
     count limit. The are merged internally, as if sent in a single HTTP/1 line.

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

4 weeks agoCan we have mercy with people working on case-preserving file systems?
Stefan Eissing [Mon, 13 Jul 2020 15:24:45 +0000 (15:24 +0000)]
Can we have mercy with people working on case-preserving file systems?

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

4 weeks agoTest VPATH build in Travis, update docs.
Joe Orton [Mon, 13 Jul 2020 14:02:39 +0000 (14:02 +0000)]
Test VPATH build in Travis, update docs.

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

4 weeks agoAdd a new way to document changes
Ruediger Pluem [Mon, 13 Jul 2020 10:29:11 +0000 (10:29 +0000)]
Add a new way to document changes

* Makefile.in: Define the update-changes target to merge the change files
  from the changes directory to the top of the CHANGES file and remove
  them afterwards. If a Subversion binary was found during configure try
  to svn rm them otherwise just delete them.

* configure.in: Search for the Subversion binary.

* acinclude.m4: Set the corresponding Makefile variable for the Subversion
  binary.

* README.CHANGES: New file to document the new approach.

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

4 weeks agoActually clear the cache for the worker MPM (missed in r1879757).
Joe Orton [Mon, 13 Jul 2020 07:27:04 +0000 (07:27 +0000)]
Actually clear the cache for the worker MPM (missed in r1879757).

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

4 weeks agoTry removing the cached ~/perl5 to reset the broken worker
Joe Orton [Fri, 10 Jul 2020 11:25:14 +0000 (11:25 +0000)]
Try removing the cached ~/perl5 to reset the broken worker
MPM test job.

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

4 weeks agoFor TEST_SSL=1 runs, test SSLSessionCache with shmcb, memcached
Joe Orton [Tue, 7 Jul 2020 16:00:55 +0000 (16:00 +0000)]
For TEST_SSL=1 runs, test SSLSessionCache with shmcb, memcached
and redis socache providers.  Force TLSv1.2 for these runs since
TLSv1.3 doesn't use the cache.

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

4 weeks agoCheck for and use gettid() directly if available; glibc 2.30 and later
Joe Orton [Tue, 7 Jul 2020 13:40:15 +0000 (13:40 +0000)]
Check for and use gettid() directly if available; glibc 2.30 and later
provides a wrapper for the system call:

* configure.in: Check for gettid() and define HAVE_SYS_GETTID if
  gettid() is only usable via syscall().

* server/log.c (log_tid): Use gettid() directly if available.

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

5 weeks agoBump the logno.
Graham Leggett [Mon, 6 Jul 2020 12:17:47 +0000 (12:17 +0000)]
Bump the logno.

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

5 weeks ago* Update logno
Ruediger Pluem [Mon, 6 Jul 2020 12:15:02 +0000 (12:15 +0000)]
* Update logno

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

5 weeks ago* Make get_line more robust in the case that it is called multiple times:
Ruediger Pluem [Mon, 6 Jul 2020 12:13:33 +0000 (12:13 +0000)]
* Make get_line more robust in the case that it is called multiple times:

  - Safe the brigade between mutiple calls to correctly handle transient
    buckets.
  - Detect possible endless loops.

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

5 weeks ago* Do not try to parse already aborted requests
Ruediger Pluem [Mon, 6 Jul 2020 11:55:21 +0000 (11:55 +0000)]
* Do not try to parse already aborted requests

Submitted by: icing

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

5 weeks agoUse a brigade instead of direct reads, allow APR to handle MMAP.
Graham Leggett [Mon, 6 Jul 2020 10:06:08 +0000 (10:06 +0000)]
Use a brigade instead of direct reads, allow APR to handle MMAP.

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

5 weeks agoExtend method_precondition hook to be called during the PROPFIND
Graham Leggett [Sun, 5 Jul 2020 11:52:06 +0000 (11:52 +0000)]
Extend method_precondition hook to be called during the PROPFIND
and LABEL walkers, once for each walked resource.

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

5 weeks agofr doc rebuild.
Lucien Gentis [Sat, 4 Jul 2020 14:28:02 +0000 (14:28 +0000)]
fr doc rebuild.

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

5 weeks agofr doc xml files updates.
Lucien Gentis [Sat, 4 Jul 2020 14:25:36 +0000 (14:25 +0000)]
fr doc xml files updates.

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

5 weeks agoBump log numbers.
Graham Leggett [Fri, 3 Jul 2020 19:52:29 +0000 (19:52 +0000)]
Bump log numbers.

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

5 weeks agoAdd MMAP support to ETag generation.
Graham Leggett [Fri, 3 Jul 2020 19:48:53 +0000 (19:48 +0000)]
Add MMAP support to ETag generation.

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

5 weeks agoBump MMN correctly.
Graham Leggett [Fri, 3 Jul 2020 14:49:21 +0000 (14:49 +0000)]
Bump MMN correctly.

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

5 weeks agocore: Remove support for the Content-MD5 header, removed in RFC7231.
Graham Leggett [Fri, 3 Jul 2020 12:44:53 +0000 (12:44 +0000)]
core: Remove support for the Content-MD5 header, removed in RFC7231.
Functions ap_md5digest() and ap_md5contextTo64() removed, and
ContentDigest directive.

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

5 weeks agoAdd skeleton for new features docs for 2.6.
Graham Leggett [Fri, 3 Jul 2020 12:29:55 +0000 (12:29 +0000)]
Add skeleton for new features docs for 2.6.

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

5 weeks agoAdd log numbers to util_etag.c.
Graham Leggett [Fri, 3 Jul 2020 11:19:10 +0000 (11:19 +0000)]
Add log numbers to util_etag.c.

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

5 weeks agoSeek to the start of the file when calculating the ETag.
Graham Leggett [Fri, 3 Jul 2020 09:11:42 +0000 (09:11 +0000)]
Seek to the start of the file when calculating the ETag.

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

5 weeks agomod_dav: Allow other DAV modules to use dav_get_resource().
Graham Leggett [Fri, 3 Jul 2020 08:29:56 +0000 (08:29 +0000)]
mod_dav: Allow other DAV modules to use dav_get_resource().

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

5 weeks agoBe defensive when calculating the digest. Make sure the offset is initialised
Graham Leggett [Fri, 3 Jul 2020 08:21:13 +0000 (08:21 +0000)]
Be defensive when calculating the digest. Make sure the offset is initialised
to zero before reading the current offset.

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

5 weeks agoFollow up to r1879449: yet better MPM poll callback API.
Yann Ylavic [Thu, 2 Jul 2020 15:49:53 +0000 (15:49 +0000)]
Follow up to r1879449: yet better MPM poll callback API.

Let pass a const pfds to the MPM, for it to make a copy on the given pool
as needed.

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

5 weeks agompm_common: add pool argument to mpm_register_poll_callback[_timeout] hooks.
Yann Ylavic [Thu, 2 Jul 2020 15:06:23 +0000 (15:06 +0000)]
mpm_common: add pool argument to mpm_register_poll_callback[_timeout] hooks.

This is cleaner API than using pfds->pool implicitely.

MAJOR bump but reusing the existing hooks (with an API/ABI breakage) because
it's trunk material only.

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

5 weeks agoAdjust for r1879447 to specify shmcb is tested when
Joe Orton [Thu, 2 Jul 2020 14:34:17 +0000 (14:34 +0000)]
Adjust for r1879447 to specify shmcb is tested when
TEST_SSL_SESSCACHE is defined. [skip ci]

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

5 weeks ago* modules/ssl/ssl_scache.c (ssl_scache_init): Use <16 character
Joe Orton [Thu, 2 Jul 2020 14:13:09 +0000 (14:13 +0000)]
* modules/ssl/ssl_scache.c (ssl_scache_init): Use <16 character
  cname argument for socache ->init() per the API constraint.

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

5 weeks agoAdd additional test suite runs for the prefork & event pool-debug builds:
Joe Orton [Thu, 2 Jul 2020 13:31:30 +0000 (13:31 +0000)]
Add additional test suite runs for the prefork & event pool-debug builds:
- run with SSLSessionCache defined (after r1879430)
- run with "SSLProtocol TLSv1.2"

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

5 weeks agomod_proxy_wstunnel: follow up to r1879418: handle first async lifetime too.
Yann Ylavic [Thu, 2 Jul 2020 12:22:07 +0000 (12:22 +0000)]
mod_proxy_wstunnel: follow up to r1879418: handle first async lifetime too.

Create the dedicated pfds and subpool in proxy_wstunnel_request() too, for
the first call to ap_mpm_register_poll_callback_timeout().

While at it, add comments about why we need the dedicated pfds/subpool.

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

5 weeks agomod_proxy_http: follow up to r1879419: clarify poll callback pds/subpool.
Yann Ylavic [Thu, 2 Jul 2020 12:15:57 +0000 (12:15 +0000)]
mod_proxy_http: follow up to r1879419: clarify poll callback pds/subpool.

Comments about why we need a dedicated pfds and its subpool for
ap_mpm_register_poll_callback_timeout().

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

5 weeks agompm_common: remove ap_mpm_unregister_poll_callback().
Yann Ylavic [Thu, 2 Jul 2020 00:33:46 +0000 (00:33 +0000)]
mpm_common: remove ap_mpm_unregister_poll_callback().

It's now called automatically by mpm_event and anyway can't be called safely
outside the MPM code without racing.

MAJOR bump.

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

5 weeks agoFollow up to r1879419: CHANGES entry.
Yann Ylavic [Thu, 2 Jul 2020 00:25:32 +0000 (00:25 +0000)]
Follow up to r1879419: CHANGES entry.

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

5 weeks agomod_proxy_http: handle async tunneling of Upgrade(d) protocols.
Yann Ylavic [Thu, 2 Jul 2020 00:14:26 +0000 (00:14 +0000)]
mod_proxy_http: handle async tunneling of Upgrade(d) protocols.

When supported by the MPM (i.e. "event"), provide async callbacks and let
them be scheduled by ap_mpm_register_poll_callback_timeout(), while the
handler returns SUSPENDED.

The new ProxyAsyncDelay directive (if positive) enables async handling,
while ProxyAsyncIdleTimeout determines the timeout applied on both ends
while tunneling.

Github: closes #126

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

5 weeks agomod_proxy_wstunnel: avoid leaks on tunnel->pfds->pool.
Yann Ylavic [Thu, 2 Jul 2020 00:07:04 +0000 (00:07 +0000)]
mod_proxy_wstunnel: avoid leaks on tunnel->pfds->pool.

Since event_register_poll_callback_ex() allocates its data on pfds->pool,
we need a subpool to be cleared at each proxy_wstunnel_callback() call.

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

5 weeks agompm_event: poll callbacks fixes and improvements.
Yann Ylavic [Thu, 2 Jul 2020 00:04:57 +0000 (00:04 +0000)]
mpm_event: poll callbacks fixes and improvements.

server/mpm_fdqueue.h;
    Rename "remove" field to "pfds" in timer_event_t.

server/mpm/event/event.c:
    update_reqevents_from_sense():
        New helper to update pfd->reqevents according to the given cs->sense
        for CONN_STATE_WRITE_COMPLETION, reusable in process_socket() and
        event_resume_suspended().

    event_resume_suspended():
        Process lingering close if given cs->state = CONN_STATE_LINGER.
        Call notify_suspend() before entering CONN_STATE_WRITE_COMPLETION.

    event_register_poll_callback_ex():
        Don't poll pfds with reqevents == 0.

    listener_thread():
        Run event_cleanup_poll_callback to both remove the registered pfds
        and leave pfds->pool in a consistent state.
        Process users callabacks after all PT_USER batons have been collected
        in the result pfds loop, otherwise we might race with the callbacks
        within the loop if multiple events/sockets concern the same baton, and
        crash if pfds->pool is cleared.

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

5 weeks agomod_ssl: release coalesced data when called from ap_filter_output_pending().
Yann Ylavic [Wed, 1 Jul 2020 23:16:04 +0000 (23:16 +0000)]
mod_ssl: release coalesced data when called from ap_filter_output_pending().

The purpose of ap_filter_output_pending() is to flush pending data, so
ssl_io_filter_coalesce() should honor that.

This allows mod_proxy to not care about mod_ssl coalescing filters when
tunneling between connections.

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

5 weeks agomod_proxy: reindent ap_proxy_transfer_between_connections() after r1879401.
Yann Ylavic [Wed, 1 Jul 2020 16:44:15 +0000 (16:44 +0000)]
mod_proxy: reindent ap_proxy_transfer_between_connections() after r1879401.

No functional change.

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

5 weeks agomod_proxy: improved and reentrant tunneling loop.
Yann Ylavic [Wed, 1 Jul 2020 16:35:48 +0000 (16:35 +0000)]
mod_proxy: improved and reentrant tunneling loop.

modules/proxy/mod_proxy.h:
    Rename AP_PROXY_TRANSFER_SHOULD_YIELD to AP_PROXY_TRANSFER_YIELD_PENDING
    and add AP_PROXY_TRANSFER_YIELD_MAX_READS.

modules/proxy/mod_proxy_http.c:
modules/proxy/mod_proxy_wstunnel.c:
    Removing of reqtimeout filter is now handled by ap_proxy_tunnel_create().

modules/proxy/proxy_util.c:
    ap_proxy_transfer_between_connections():
        Reorganize loop to break out early.
        When AP_PROXY_TRANSFER_YIELD_PENDING, if !ap_filter_should_yield() we
        still need to run and check ap_filter_output_pending() since it may
        release pending data.
        When AP_PROXY_TRANSFER_YIELD_MAX_READS, stop the loop after too much
        reads (PROXY_TRANSFER_MAX_READS = 10000) to release the thread and
        give the caller a chance to schedule the other direction.
        Don't return APR_INCOMPLETE when it comes from an incomplete body
        detected by ap_http_filter().

    ap_proxy_tunnel_create():
        Start with POLLOUT on both directions so that any pending output data
        is flushed first.

    ap_proxy_tunnel_run():
        Remove re-init/clear of the pollset for each call so that the function
        is reentrant.
        Handle POLLOUT before POLLIN so that we can read in the same pass once
        all buffered output data are flushed, using ap_filter_input_pending()
        to drain buffered input data.

This is preparatory patch for async websocket tunneling is mod_proxy_http.

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

5 weeks ago* Improve formating and aligning [skip ci]
Ruediger Pluem [Tue, 30 Jun 2020 20:23:52 +0000 (20:23 +0000)]
* Improve formating and aligning [skip ci]

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

5 weeks ago* Use isValidAddress when dumping buckets [skip ci]
Ruediger Pluem [Tue, 30 Jun 2020 20:16:19 +0000 (20:16 +0000)]
* Use isValidAddress when dumping buckets [skip ci]

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

5 weeks ago* Create helper function isValidAddress to determine if an address is valid [skip ci]
Ruediger Pluem [Tue, 30 Jun 2020 20:14:36 +0000 (20:14 +0000)]
* Create helper function isValidAddress to determine if an address is valid [skip ci]

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

5 weeks ago* Let dump_brigade print the length of the brigade
Ruediger Pluem [Tue, 30 Jun 2020 19:34:10 +0000 (19:34 +0000)]
* Let dump_brigade print the length of the brigade

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

5 weeks agoFollow up to r1877955: don't reuse the connection for mixed C-L / T-E requests
Yann Ylavic [Tue, 30 Jun 2020 16:05:56 +0000 (16:05 +0000)]
Follow up to r1877955: don't reuse the connection for mixed C-L / T-E requests

Disable keepalive on the connection if we received both Content-Length and
chunked Transfer-Encoding in the request, to avoid confusion with front
intermediaries and potential further request/response splitting.

This is what we do already for mod_proxy backend connections in the same case.

While at it, replace draft httpbis links with final RFC7230's.

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

5 weeks agoTravis changes:
Joe Orton [Tue, 30 Jun 2020 14:24:43 +0000 (14:24 +0000)]
Travis changes:
a) add job to check for empty APLOGNO() macros
b) don't install CPAN stuff if SKIP_TESTING is set
c) don't tail the error_log on test suite failure since it's almost
   always irrelevant shutdown stuff and obscures the actual failures
d) use coloured grep output when showing segfaults to make them obvious in the
   travis error_log output.
   e.g. https://travis-ci.org/github/apache/httpd/jobs/703517978#L2537

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

5 weeks agoFollow up to r1877955: always validate the Content-Length
Yann Ylavic [Tue, 30 Jun 2020 14:18:22 +0000 (14:18 +0000)]
Follow up to r1877955: always validate the Content-Length

even if it is to be ignored because of RFC7230 section 3.3.3 requirements.

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

5 weeks agoAdd Travis jobs to test shared-MPMs under APR pool-debug with both event and prefork.
Joe Orton [Tue, 30 Jun 2020 13:26:59 +0000 (13:26 +0000)]
Add Travis jobs to test shared-MPMs under APR pool-debug with both event and prefork.

Github: closes #111

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

5 weeks agoRevert r1879361: 2.4.x material only.
Yann Ylavic [Tue, 30 Jun 2020 12:29:06 +0000 (12:29 +0000)]
Revert r1879361: 2.4.x material only.

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

5 weeks agomod_proxy: unfail mixed ProxyPass/<Proxy> and ProxyPassMatch/<ProxyMatch>.
Yann Ylavic [Tue, 30 Jun 2020 12:15:41 +0000 (12:15 +0000)]
mod_proxy: unfail mixed ProxyPass/<Proxy> and ProxyPassMatch/<ProxyMatch>.

It is not a failure in current 2.4.x, so to ease backport and to avoid compat
breakage simply warn about the second directive being ignored.

This commit can be reverted in trunk if we want next versions to fail in this
case.

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

5 weeks agoFollow up to r1879235: fill APLOGNO().
Yann Ylavic [Tue, 30 Jun 2020 11:59:44 +0000 (11:59 +0000)]
Follow up to r1879235: fill APLOGNO().

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

6 weeks agoserver/util_script.c: reserve one APLOGNO number after r1879253
Luca Toscano [Mon, 29 Jun 2020 19:29:47 +0000 (19:29 +0000)]
server/util_script.c: reserve one APLOGNO number after r1879253

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

6 weeks agoUse a dedicated constant for the base64 sha1 length.
Graham Leggett [Mon, 29 Jun 2020 17:45:35 +0000 (17:45 +0000)]
Use a dedicated constant for the base64 sha1 length.

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

6 weeks agoRemove tabs.
Graham Leggett [Mon, 29 Jun 2020 17:43:09 +0000 (17:43 +0000)]
Remove tabs.

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

6 weeks agoBegone foul tabs.
Graham Leggett [Mon, 29 Jun 2020 16:29:58 +0000 (16:29 +0000)]
Begone foul tabs.

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

6 weeks agomod_dav: Add method_precondition hook. WebDAV extensions define
Graham Leggett [Mon, 29 Jun 2020 16:21:52 +0000 (16:21 +0000)]
mod_dav: Add method_precondition hook. WebDAV extensions define
conditions that must exist before a WebDAV method can be executed.
This hook allows a WebDAV extension to verify these preconditions.

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

6 weeks agoMake sure the get and restore the file offset when conputing the ETag. Be defensive
Graham Leggett [Mon, 29 Jun 2020 14:08:01 +0000 (14:08 +0000)]
Make sure the get and restore the file offset when conputing the ETag. Be defensive
when opening the file.

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

6 weeks agoBe defensive when the request is missing.
Graham Leggett [Mon, 29 Jun 2020 09:33:12 +0000 (09:33 +0000)]
Be defensive when the request is missing.

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

6 weeks agoAdd implementation of deliver_report and gather_reports to mod_dav.c.
Graham Leggett [Sun, 28 Jun 2020 13:28:19 +0000 (13:28 +0000)]
Add implementation of deliver_report and gather_reports to mod_dav.c.

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

6 weeks agoAdd hooks deliver_report and gather_reports to mod_dav.h. Allows other
Graham Leggett [Sun, 28 Jun 2020 13:17:26 +0000 (13:17 +0000)]
Add hooks deliver_report and gather_reports to mod_dav.h. Allows other
modules apart from versioning implementations to handle the REPORT method.

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

6 weeks agoAdd dav_get_provider(), dav_open_lockdb() and dav_close_lockdb() mod_dav.h.
Graham Leggett [Sun, 28 Jun 2020 12:40:56 +0000 (12:40 +0000)]
Add dav_get_provider(), dav_open_lockdb() and dav_close_lockdb() mod_dav.h.

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

6 weeks ago"[mod_dav_fs etag handling] should really honor the FileETag setting".
Graham Leggett [Sat, 27 Jun 2020 23:41:00 +0000 (23:41 +0000)]
"[mod_dav_fs etag handling] should really honor the FileETag setting".
- It now does.
- Add "Digest" to FileETag directive, allowing a strong ETag to be
  generated using a file digest.
- Add ap_make_etag_ex() and ap_set_etag_fd() to allow full control over
  ETag generation.
- Add concept of "binary notes" to request_rec, allowing packed bit flags
  to be added to a request.
- First binary note - AP_REQUEST_STRONG_ETAG - allows modules to force
  the ETag to a strong ETag to comply with RFC requirements, such as those
  mandated by various WebDAV extensions.

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

6 weeks agoserver/util_script.c: tune logging Last-Modified header
Luca Toscano [Sat, 27 Jun 2020 09:11:32 +0000 (09:11 +0000)]
server/util_script.c: tune logging Last-Modified header

Follow up after Joe's feedback in STATUS:
  - If APR_DATE_BAD is returned for Last-Modified, log it at INFO level
    (as opposed to trace).
  - Remove unnecessary guard for APLOGrtrace1(r).

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

6 weeks agoFollow up to r1879080 and r1879137: servlet-normalize r->uri if matched.
Yann Ylavic [Fri, 26 Jun 2020 12:51:08 +0000 (12:51 +0000)]
Follow up to r1879080 and r1879137: servlet-normalize r->uri if matched.

If a ProxyPass mapping=servlet matches (in pre_trans hook), update r->uri with
the servlet normalization so that later <Location> or any dir context match
does not have to handle potential path parameters.

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

6 weeks agoAdd a plain mod_cgid build, explicitly without mod_cgi.
Joe Orton [Thu, 25 Jun 2020 12:32:30 +0000 (12:32 +0000)]
Add a plain mod_cgid build, explicitly without mod_cgi.

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

6 weeks agoFollow up to r1879179: CHANGES entry.
Yann Ylavic [Thu, 25 Jun 2020 11:21:37 +0000 (11:21 +0000)]
Follow up to r1879179: CHANGES entry.

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

6 weeks agoEVP_PKEY_up_ref(): fix bad reference count locking.
Yann Ylavic [Thu, 25 Jun 2020 11:08:33 +0000 (11:08 +0000)]
EVP_PKEY_up_ref(): fix bad reference count locking.

When enabling client authentication for proxy (SSLProxyMachineCertificateFile),
the client certificate callback function ssl_callback_proxy_cert uses another
reference count locking type then one that is used by the caller function when
trying to free the private key afterwards by using EVP_PKEY_free.

This can lead to a race-condition on pkey->references resulting in a double
free error.

On my system, the error occurs sporadically when threaded health checking
(mod_watchdog) forces two threads competing for the client's private key.

For example, see following two backtraces of a coredump where thread 1 and
thread 15 both run into CRYPTO_free(). Actually, the private key should never
be freed during run-time nor should two threads ever enter CRYPTO_free()
concurrently.

(gdb) t 1
[Switching to thread 1 (Thread 0xb2cfbb40 (LWP 16054))]
#0 0xf7f3f329 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7f3f329 in __kernel_vsyscall ()
#1 0xf7cec9e7 in raise () from /lib32/libc.so.6
#2 0xf7cedfb9 in abort () from /lib32/libc.so.6
#3 0xf7d2a14d in ?? () from /lib32/libc.so.6
#4 0xf7d2fd27 in ?? () from /lib32/libc.so.6
#5 0xf7d3047d in ?? () from /lib32/libc.so.6
#6 0x08499c70 in CRYPTO_free (str=0x93376b0) at mem.c:434
#7 0x084cc063 in EVP_PKEY_free (x=0x93376b0) at p_lib.c:406
#8 0x08463917 in ssl3_send_client_certificate (s=0xad21f070) at s3_clnt.c:3475
#9 0x0845d62c in ssl3_connect (s=0xad21f070) at s3_clnt.c:426
#10 0x08484213 in SSL_connect (s=0xad21f070) at ssl_lib.c:1008
#11 0x0846f9c8 in ssl23_get_server_hello (s=0xad21f070) at s23_clnt.c:832
#12 0x0846ea45 in ssl23_connect (s=0xad21f070) at s23_clnt.c:231
#13 0x08484213 in SSL_connect (s=0xad21f070) at ssl_lib.c:1008
#14 0x08261e73 in ssl_io_filter_handshake (filter_ctx=0xb4d3f450) at ssl_engine_io.c:1245
#15 0x08263ba6 in ssl_io_filter_output (f=0xb4d3f480, bb=0xacc079a0) at ssl_engine_io.c:1760
#16 0x080ea2c9 in ap_pass_brigade (next=0xb4d3f480, bb=0xacc079a0) at util_filter.c:590
#17 0x08263b07 in ssl_io_filter_coalesce (f=0xb4d3f468, bb=0xacc079a0) at ssl_engine_io.c:1728
#18 0x080ea2c9 in ap_pass_brigade (next=0xb4d3f468, bb=0xacc079a0) at util_filter.c:590
#19 0x08251658 in hc_send (r=0xacc069b0, out=0x8c25ec8 "GET /hcheck HTTP/1.0\r\nHost: XXX\r\n\r\n", bb=0xacc079a0) at mod_proxy_hcheck.c:664
#20 0x08251eb3 in hc_check_http (baton=0xacc068d8) at mod_proxy_hcheck.c:806
#21 0x08252653 in hc_check (thread=0x8cc6b10, b=0xacc068d8) at mod_proxy_hcheck.c:870
#22 0x08383185 in thread_pool_func (t=0x8cc6b10, param=0x8c245e0) at misc/apr_thread_pool.c:266
#23 0x083baef6 in dummy_worker (opaque=0x8cc6b10) at threadproc/unix/thread.c:142
#24 0xf7ec615f in start_thread () from /lib32/libpthread.so.0
#25 0xf7da862e in clone () from /lib32/libc.so.6

(gdb) t 15
[Switching to thread 15 (Thread 0xb44feb40 (LWP 16049))]
#0 0xf7dd90a5 in _dl_addr () from /lib32/libc.so.6
(gdb) bt
#0 0xf7dd90a5 in _dl_addr () from /lib32/libc.so.6
#1 0xf7db610c in backtrace_symbols_fd () from /lib32/libc.so.6
#2 0xf7cd89ab in ?? () from /lib32/libc.so.6
#3 0xf7d2a148 in ?? () from /lib32/libc.so.6
#4 0xf7d2fd27 in ?? () from /lib32/libc.so.6
#5 0xf7d3047d in ?? () from /lib32/libc.so.6
#6 0x08499c70 in CRYPTO_free (str=0x93376b0) at mem.c:434
#7 0x084cc063 in EVP_PKEY_free (x=0x93376b0) at p_lib.c:406
#8 0x08463917 in ssl3_send_client_certificate (s=0xacf1baa0) at s3_clnt.c:3475
#9 0x0845d62c in ssl3_connect (s=0xacf1baa0) at s3_clnt.c:426
#10 0x08484213 in SSL_connect (s=0xacf1baa0) at ssl_lib.c:1008
#11 0x0846f9c8 in ssl23_get_server_hello (s=0xacf1baa0) at s23_clnt.c:832
#12 0x0846ea45 in ssl23_connect (s=0xacf1baa0) at s23_clnt.c:231
#13 0x08484213 in SSL_connect (s=0xacf1baa0) at ssl_lib.c:1008
#14 0x08261e73 in ssl_io_filter_handshake (filter_ctx=0xb4d37430) at ssl_engine_io.c:1245
#15 0x08263ba6 in ssl_io_filter_output (f=0xb4d37460, bb=0xad101588) at ssl_engine_io.c:1760
#16 0x080ea2c9 in ap_pass_brigade (next=0xb4d37460, bb=0xad101588) at util_filter.c:590
#17 0x08263b07 in ssl_io_filter_coalesce (f=0xb4d37448, bb=0xad101588) at ssl_engine_io.c:1728
#18 0x080ea2c9 in ap_pass_brigade (next=0xb4d37448, bb=0xad101588) at util_filter.c:590
#19 0x08251658 in hc_send (r=0xad100598, out=0x8c25898 "GET /hcheck HTTP/1.0\r\nHost: XXX\r\n\r\n", bb=0xad101588) at mod_proxy_hcheck.c:664
#20 0x08251eb3 in hc_check_http (baton=0xad1004c0) at mod_proxy_hcheck.c:806
#21 0x08252653 in hc_check (thread=0x8cc6ab0, b=0xad1004c0) at mod_proxy_hcheck.c:870
#22 0x08383185 in thread_pool_func (t=0x8cc6ab0, param=0x8c245e0) at misc/apr_thread_pool.c:266
#23 0x083baef6 in dummy_worker (opaque=0x8cc6ab0) at threadproc/unix/thread.c:142
#24 0xf7ec615f in start_thread () from /lib32/libpthread.so.0
#25 0xf7da862e in clone () from /lib32/libc.so.6

Many thanks to Armin for finding this.

Github: closes #129
Submitted by: Armin Abfalterer (arminabf)
Reviewed by: ylavic

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

6 weeks agomod_http2: making filter names all uppercase again.
Stefan Eissing [Wed, 24 Jun 2020 14:36:18 +0000 (14:36 +0000)]
mod_http2: making filter names all uppercase again.

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

6 weeks agoFollow up to r1879074: don't let dav_process_if_header() go above root.
Yann Ylavic [Wed, 24 Jun 2020 12:23:15 +0000 (12:23 +0000)]
Follow up to r1879074: don't let dav_process_if_header() go above root.

And fall through as "/".

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

6 weeks agoFollow up to r1879079: fail early if URI path resolves above root.
Yann Ylavic [Wed, 24 Jun 2020 12:11:08 +0000 (12:11 +0000)]
Follow up to r1879079: fail early if URI path resolves above root.

Don't let it through as "/".

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

6 weeks agoFollow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.
Yann Ylavic [Wed, 24 Jun 2020 10:16:06 +0000 (10:16 +0000)]
Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.

Instead of having a separate ProxyUseOriginalURI directive to control pre_ vs
normal translate stage, let's handle this at each ProxyPass level, with the
mapping= parameter.

At pre_translate stage mod_proxy will handle the "encoded" mapping only, and
at translate stage only the others (unless a worker was already elected at
the first stage).

Note that since mapping=servlet needs to happen encoded too, it's defined like:
    #define PROXYPASS_MAP_ENCODED 0x08
    #define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */
so uch that proxy_trans does the right thing.

Follow up to r1879080: replace ProxyUseOriginalURI by mapping=encoded.

Instead of having a separate ProxyUseOriginalURI directive to control pre_ vs
normal translate stage, let's handle this at each ProxyPass level, with the
mapping= parameter.

At pre_translate stage mod_proxy will handle the "encoded" mapping only, and
at translate stage only the others (unless a worker was already elected at
the first stage).

Note that since mapping=servlet needs to happen encoded too, it's defined like:
    #define PROXYPASS_MAP_ENCODED 0x08
    #define PROXYPASS_MAP_SERVLET 0x18 /* + MAP_ENCODED */
so that proxy_trans does the right thing.

This allows for simpler and consistent mapping configuration, where the
translate stage depends only on the mapping= parameter.

To implement a fast path (do nothing) when no encoded mapping is configured
at pre_trans stage, or all mappings are encoded at translate stage, two bits
are added to proxy_server_conf (map_encoded_one:1, map_encoded_all:1) and
updated at load time. Thus MINOR is bumped too.

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