12042 Commits

Author SHA1 Message Date
beb75b5cb5 future-proof by flattening expr rc to 0/1
Submitted By: ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927314 13f79535-47bb-0310-9956-ffa450edef68
2025-07-18 15:25:33 +00:00
6e59b12422 rc already is set by result of expression eval
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927270 13f79535-47bb-0310-9956-ffa450edef68
2025-07-16 17:33:21 +00:00
8e529cecca * mod_http2/mod_proxy_http2: fix a bug in calculating the log2 value of
integers, used in push diaries and proxy window size calculations.
    PR69741 [Benjamin P. Kallus]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927235 13f79535-47bb-0310-9956-ffa450edef68
2025-07-15 06:35:04 +00:00
423c67c0c1 avoid compile error with curl < 7.44.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927054 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 15:29:13 +00:00
a6b8db04ec improve h2 header error handling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927038 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:56:48 +00:00
63f48bb6f3 remove antiquated 'SSLEngine optional' TLS upgrade
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927037 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:55:00 +00:00
349248060f tolerate missing host header in h2 proxy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927036 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:53:43 +00:00
d76573e760 update SNI validation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927035 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:51:57 +00:00
5c8e7ca468 escape ssl vars
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927034 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:50:41 +00:00
dd98030cb3 expand UNC checking
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927033 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:49:48 +00:00
32cf503799 header only
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927032 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:48:06 +00:00
36f619966b mod_so: Add -D DUMP_MODULE_DATA to print module data in structured
format (TOML) including MMN information.

* modules/core/mod_so.c (print_mod_data): New function.
  (dump_loaded_modules): Use it if DUMP_MODULE_DATA is defined.

* docs/manual/programs/httpd.xml: Move -DDUMP_* docs to a new
  section, cover the above new option.

Github: closes #537


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926737 13f79535-47bb-0310-9956-ffa450edef68
2025-06-26 09:21:25 +00:00
9b06444951 * modules/ssl/ssl_private.h: Fix logic in r1926720 HAVE_OPENSSL_KEYLOG macro,
thanks to rpluem.

Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926722 13f79535-47bb-0310-9956-ffa450edef68
2025-06-25 15:16:22 +00:00
c2ffd2a551 * modules/ssl/ssl_private.h: For OpenSSL >= 3.5.0 drop $SSLKEYLOGFILE
handling inside mod_ssl where OpenSSL is built to handle that
  internally in libssl.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926720 13f79535-47bb-0310-9956-ffa450edef68
2025-06-25 12:53:18 +00:00
e5a19d43e0 mod_ssl: Accept expired client certs with optional_no_ca mode.
* modules/ssl/ssl_private.h (ssl_verify_error_is_optional): Add
  X509_V_ERR_CERT_HAS_EXPIRED to the list of error exceptions
  permitted for "optional_no_ca" mode.

Submitted by: Naveen Albert <apache2 phreaknet.org>
PR: 60028
Github: closes #509


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926714 13f79535-47bb-0310-9956-ffa450edef68
2025-06-25 07:55:26 +00:00
9a2eca1ca1 Follow-up to r1922931.
In set_cookie_name() and set_cookie_name2(), now that the empty 'name' argument is explicitly handled, the error message in check_string() can be simplified because the cookie name can't be empty anymore when this function is called.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926188 13f79535-47bb-0310-9956-ffa450edef68
2025-06-06 20:12:16 +00:00
39265983d1 * modules/dav/fs/repos.c (dav_fs_remove_resource):
Return a 404 if apr_file_remove() fails with an ENOENT error,
  likely due to a race with another DELETE.

PR: 60746
Github: closes #535


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926172 13f79535-47bb-0310-9956-ffa450edef68
2025-06-06 10:36:00 +00:00
2de0d11e9b *) mod_md: update to version 2.5.2
- Fixed TLS-ALPN-01 challenges when multiple `MDPrivateKeys` are specified
       with EC keys before RSA ones. Fixes #377. [Stefan Eissing]
     - Fixed missing newlines in the status page output. [Andreas Groth]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925979 13f79535-47bb-0310-9956-ffa450edef68
2025-05-30 12:45:59 +00:00
b84e2e2068 *) mod_http2: update to version 2.0.32
The code setting the connection window size was set wrong,
     preventing `H2WindowSize` to work.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925975 13f79535-47bb-0310-9956-ffa450edef68
2025-05-30 12:20:22 +00:00
c15471ee3b mod_proxy: restore reuse of ProxyRemote connections when possible.
Fixes a regression from 2.4.59 (r1913907).

For a reverse proxy setup with a worker (enablereuse=on) and a
forward/CONNECT ProxyRemote to reach it, an open connection/tunnel
to/through the remote proxy for the same origin server (and using the
same proxy auth) should be reusable. Avoid closing them like r1913534
did.

* modules/proxy/proxy_util.c:
  Rename the struct to remote_connect_info since it's only used for
  connecting through remote CONNECT proxies. Axe the use_http_connect
  field, always true.

* modules/proxy/proxy_util.c(ap_proxy_connection_reusable):
  Remote CONNECT (forward) proxy connections can be reused if the auth
  and origin server infos are the same, so conn->forward != NULL is not
  a condition to prevent reusability.

* modules/proxy/proxy_util.c(ap_proxy_determine_connection):
  Fix the checks around conn->forward reuse and connection cleanup if
  that's not possible.

Submitted by: jfclere, ylavic
GH: closes #531


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925743 13f79535-47bb-0310-9956-ffa450edef68
2025-05-22 14:38:41 +00:00
bf19cfe634 * modules/dav/fs/repos.c (dav_fs_method_precondition):
Fix crashes when mod_dav_fs is not configured.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925371 13f79535-47bb-0310-9956-ffa450edef68
2025-05-02 15:47:09 +00:00
e36237899d * Temporarily add back the query string to the URL as it might contain the
routing information for sticky sessions.

PR: 69443


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1925109 13f79535-47bb-0310-9956-ffa450edef68
2025-04-16 11:29:25 +00:00
e6cfbfa30d mod_ssl: Check the SSLProtocol directive when loading the configuration
Previously, the SSLProtocol directive was checked at runtime. Apache quit if
the directive contained an invalid combination of protocols, and logged the
message "AH02231: No SSL protocols available [hint: SSLProtocol]".

With this change, most invalid SSLProtocol directives are detected when
checking the configuration, e.g. with \"httpd -t -f httpd.conf\".

Examples of invalid protocol combinations that are caught:
* SSLProtocol "-TLSv1"
* SSLProtocol "-all"
* SSLProtocol "TLSv1.2 -TLSv1.2"

Submitted by: Michael Kaufmann <mail michael-kaufmann.ch>
Github: closes #523


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924955 13f79535-47bb-0310-9956-ffa450edef68
2025-04-09 08:01:24 +00:00
b3a52bec98 mod_asis: Fix the log level of the message AH01236
Change the log level from ERROR to DEBUG.

The message \"mod_asis: ap_pass_brigade failed for file ...\" was logged with
the level ERROR. This log level is inappropriate here, because a client can
trigger this log message by aborting the request.

Most other modules don't log at all or use the log level DEBUG when
ap_pass_brigade() fails.

Submitted by: Michael Kaufmann <mail michael-kaufmann.ch>
Github: closes #527


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924954 13f79535-47bb-0310-9956-ffa450edef68
2025-04-09 07:43:49 +00:00
5a148b5b9d mod_ssl: Remove warning over potential uninitialised value
for ssl protocol prior to protocol selection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924757 13f79535-47bb-0310-9956-ffa450edef68
2025-04-03 14:36:16 +00:00
303ca68847 * mod_proxy_http2: revert r1912193 for detecting broken backend connections
as this interferes with backend selection who a node is unresponsive.
    PR69624.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924554 13f79535-47bb-0310-9956-ffa450edef68
2025-03-24 12:48:09 +00:00
ffeacdcc52 Fix typo in code comments; dependancies -> dependencies
Submitted by: John Bampton <jbampton gmail.com>
Github: closes #520


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924446 13f79535-47bb-0310-9956-ffa450edef68
2025-03-18 09:54:15 +00:00
f3448d02da *) mod_http2: Fix handling of 304 responses from mod_cache. PR 69580.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924267 13f79535-47bb-0310-9956-ffa450edef68
2025-03-10 10:09:43 +00:00
fecd8da88a assign log tag
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924197 13f79535-47bb-0310-9956-ffa450edef68
2025-03-06 08:35:52 +00:00
e1fe1d8505 *) mod_md: update to version 2.0.30
- Fixed bug in handling over long response headers. When the 64 KB limit
       of nghttp2 was exceeded, the request was not reset and the client was
       left hanging, waiting for it. Now the stream is reset.
     - Added new directive `H2MaxHeaderBlockLen` to set the limit on response
       header sizes.
     - Fixed handling of Timeout vs. KeepAliveTimeout when first request on a
       connection was reset.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924145 13f79535-47bb-0310-9956-ffa450edef68
2025-03-03 12:32:31 +00:00
826f90e639 mod_lua: Fix memory handling in output filters.
* modules/lua/mod_lua.c (lua_output_filter_handle): Fix brigade
  iteration to use constant memory.

Submitted by: G.Grandes <guillermo.grandes gmail.com>
PR: 69590
Github: closes #517


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1924095 13f79535-47bb-0310-9956-ffa450edef68
2025-02-28 08:24:10 +00:00
1e298ddfca mod_dav: Fix error handling for dav_fs_dir_file_name():
dav_fs_dir_file_name() will not set *fname_p to NULL on failure,
and all callers of dav_fs_dir_file_name() does not check the
return value of dav_fs_dir_file_name(), which could lead to an
undefined behavior against fname_p.

Fix this by adding return value check of dav_fs_dir_file_name()

Submitted by: Zhou Qingyang <zhou1615 umn.edu>
Github: closes #309


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923813 13f79535-47bb-0310-9956-ffa450edef68
2025-02-14 16:08:23 +00:00
e3d014c009 *) scoreboard/mod_http2: record durations of HTTP/2 requests.
PR 69579 [Pierre Brochard <pierre.brochard.1982@m4x.org>]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923754 13f79535-47bb-0310-9956-ffa450edef68
2025-02-12 09:43:40 +00:00
3af0d142f1 * Allow to unset cookies via negative lifetime values
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923725 13f79535-47bb-0310-9956-ffa450edef68
2025-02-11 10:29:03 +00:00
1db5c2359a Add API exposing the DavBasePath setting for use by DAV repository
backend modules (mod_dav_svn needs this for POST method handling).

* modules/dav/main/mod_dav.c (dav_get_base_path): New function.

* include/ap_mmn.h: Bump MMN minor.

Github: closes #513


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923639 13f79535-47bb-0310-9956-ffa450edef68
2025-02-07 11:09:25 +00:00
e07b7a2abd *) mod_md: update to v2.5.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923592 13f79535-47bb-0310-9956-ffa450edef68
2025-02-05 12:30:07 +00:00
49c2ee218f *) mod_http2: make test_h2_200_17+18 work reliably with
older and newer curl versions. Only a change in logging,
    no function module change.
    Newer curl send a GOAWAY on connection shutdown which
    triggers another code path that the test did not expect.
    Thanks to Rainer Jung for tracking this down.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923187 13f79535-47bb-0310-9956-ffa450edef68
2025-01-17 16:12:28 +00:00
202d0068d8 *) mod_md: update to version 2.4.31
- Improved error reporting when waiting for ACME server to verify domains
       or finalizing the order fails, e.g. times out.
     - Increasing the timeouts to wait for ACME server to verify domain names
       and issue the certificate from 30 seconds to 5 minutes.
     - Change a log level from error to debug when Stapling is enabled but a
       certificate carries no OCSP responder URL.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923148 13f79535-47bb-0310-9956-ffa450edef68
2025-01-15 12:48:52 +00:00
6433e92520 * Do not add a space before '|' when setting the value for stickysession in the
balancer manager as this breaks the stickysession configuration once a new
  configuration is submitted by the balancer manager.

PR: 69510
Submitted by: Yutaka Tokunou <tokunou.yutaka@fujitsu.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1923101 13f79535-47bb-0310-9956-ffa450edef68
2025-01-13 13:37:40 +00:00
b5d2f5e34e * modules/generators/mod_autoindex.c (dsortf): Ensure the function
is transitive to avoid undefined behaviour, per:
  https://www.qualys.com/2024/01/30/qsort.txt

Submitted by: Kuan-Wei Chiu <visitorckw gmail.com>
Github: closes #500


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922994 13f79535-47bb-0310-9956-ffa450edef68
2025-01-08 18:00:29 +00:00
75facde270 mod_session_dbd: set_cookie_name: ensure correct format
If args is an empty string, apr_strtok will return NULL and *last will never get set which results in a SIGSEGV in apr_isspace check

Submitted by: Thomas Meyer <thomas@m3y3r.de>

Github: closes #503


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922931 13f79535-47bb-0310-9956-ffa450edef68
2025-01-06 19:28:35 +00:00
4a9cd1fccf *) mod_md: change log level from error to debug when MDStapling
is enabled but a certificate carries no OCSP url.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922429 13f79535-47bb-0310-9956-ffa450edef68
2024-12-11 12:43:34 +00:00
72523a3e8f * Improve comment to make the main thread more clear
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922411 13f79535-47bb-0310-9956-ffa450edef68
2024-12-10 16:47:51 +00:00
cae775f2f6 *) mod_md: update to version 2.4.29
- Fixed HTTP-01 challenges to not carry a final newline, as some ACME
       server fail to ignore it. [Michael Kaufmann (@mkauf)]
     - Fixed missing label+newline in server-status plain text output when
       MDStapling is enabled.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922279 13f79535-47bb-0310-9956-ffa450edef68
2024-12-03 09:47:26 +00:00
584286f25d * Use iobuffersize set on worker level for the IO buffer size.
PR: 69402
Submitted by: Jari Ahonen <jah@progress.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922115 13f79535-47bb-0310-9956-ffa450edef68
2024-11-26 13:01:08 +00:00
de52fc46c8 Make sure the Additional error is displayed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1922079 13f79535-47bb-0310-9956-ffa450edef68
2024-11-25 13:20:47 +00:00
f4847dbc43 rollback unrelated fix to my previous commit, sorry.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921975 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 14:36:43 +00:00
d21b4c41f6 Merge PR#419: make sure the right method is displayed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921973 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 13:11:11 +00:00
73dc77ae8d * modules/aaa/mod_authnz_ldap.c (create_authnz_ldap_dir_config): Fix allocation
of sgAttributes, found by gcc -fanalyzer:

modules/aaa/mod_authnz_ldap.c: scope_hint: In function 'create_authnz_ldap_dir_config'
modules/aaa/mod_authnz_ldap.c:356:23: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921971 13f79535-47bb-0310-9956-ffa450edef68
2024-11-20 10:23:03 +00:00
d94933b89f mod_http2, fix keepalive timeout on reset requests
Count failed requests that are RST'ed, so that the
connection enters keepalive timeout instead of the
regular timeout if the first request fails.

Add tests to verify.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921805 13f79535-47bb-0310-9956-ffa450edef68
2024-11-07 12:02:41 +00:00