Skip to content

[2.4.x] Merge various small fixes - #1092

Merged
notroj merged 9 commits into
apache:2.4.xfrom
notroj:2.4.x-various-small-fixes
Nov 25, 2026
Merged

notroj merged 9 commits into
apache:2.4.xfrom
notroj:2.4.x-various-small-fixes

Conversation

@notroj

@notroj notroj commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Merge r1936266, r1936760, r1938291, r1938306, r1938748, r1938749, r1938833, f85e7bf from trunk:

Use apr_isspace() instead of isspace() in cookie parsing

  • modules/proxy/mod_proxy_balancer.c (find_session_route): Replace
    isspace() with apr_isspace() to avoid locale-dependent behavior
    and undefined behavior with negative char values.

Submitted by: arshsmith1
GitHub: closes #675

  • modules/generators/cgi_common.h (cgi_read_stdout): Log an error
    if the read fails.

PR: 70021
Github: closes #700

  • modules/http/http_protocol.c (make_allow): Don't check for the
    M_INVALID bit being set in the method mask if unregistered methods
    are allowed. That bit is never set by ap_method_list_add(), and this
    branch adding unregistered methods to Allow: never followed.

  • test/pyhttpd/mod_aptest/mod_aptest.c (aptest_allow_methods): New; pass
    the methods named in an AP-Test-Allow-Methods request header to
    ap_allow_methods().

  • test/modules/core/test_009_allow_methods.py: New test suite.

GitHub: closes #758, closes #428
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

  • modules/filters/mod_substitute.c (do_pattmatch): Enforce max line
    length on unmatched tail. Account for the unmatched tail after a
    successful substitution before emitting the result. This keeps
    SubstituteMaxLineLength effective for flattened literal substitutions
    and for both regular-expression paths.

Submitted by: Robert McConnell
GitHub: closes #755

Add test coverage:

  • test/modules/filters/init.py,
    test/modules/filters/conftest.py,
    test/modules/filters/env.py,
    test/modules/filters/test_001_substitute_maxlen.py: New test suite.

GitHub: closes #762
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

  • modules/mappers/mod_speling.c (check_speling): Decline if the
    filename's trailing component is longer than r->uri.

  • test/pytest_suite/t/conf/extra.conf.in: Add Alias /sp-oob.

  • test/pytest_suite/tests/t/modules/test_speling.py
    (test_speling_short_uri_alias): New test.

Submitted by: arshiya tabasum
GitHub: closes #778

  • modules/aaa/mod_authnz_fcgi.c (handle_response): Log the stderr
    record using the received length rather than as a C string.

Submitted by: arshiya tabasum
GitHub: closes #779

mod_socache_redis: Fix the unit of the RedisTimeout passed to the Redis
client.

  • modules/cache/mod_socache_redis.c
    (RD_DEFAULT_SERVER_RWTO): Define in seconds rather than microseconds.
    (socache_rd_set_timeout): Convert the timeout from apr_time_t to whole
    seconds, rounding up so a positive value does not become 0.

  • test/modules/ssl/env.py
    (SSLTestSetup.init): Add socache_redis as an optional module.

  • test/modules/ssl/test_004_socache_redis.py: New test using a silent
    Redis server to verify that RedisTimeout values are applied with the
    expected whole-second rounding.

Submitted by: Christophe JAILLET, Arturo Bernal
GitHub: closes #790

mod_authn_socache: Fix a crash on AuthnCacheProvideFor in htaccess
without AuthnCacheEnable:

  • modules/aaa/mod_authn_socache.c (authn_cache_setprovider): Don't
    set configured from an htaccess file.

  • test/modules/aaa/test_016_authn_socache.py
    (TestAuthnSocacheHtaccess): Test without AuthnCacheEnable.

  • changes-entries/authn_socache_htaccess.txt: New file.

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

The tests for r1938291, r1938306, r1938748 and r1938833 are already on 2.4.x, so those picks carry no test/ changes. The test change in f85e7bf is omitted: test_016_authn_socache.py is not on 2.4.x and covers other trunk-only changes.

The last commit is test-only: it marks the tests for r1938291, r1938306 and r1938833 as backported in 2.4.72, and needs the same change on trunk.

🤖 Generated with Claude Code

notroj and others added 9 commits November 25, 2026 21:14
* modules/proxy/mod_proxy_balancer.c (find_session_route): Replace
  isspace() with apr_isspace() to avoid locale-dependent behavior
  and undefined behavior with negative char values.

Submitted by: arshsmith1 <arshi bugqore.com>
GitHub: closes apache#675

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936266 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 4f01170)
  if the read fails.

PR: 70021
Github: closes apache#700

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936760 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 021b35d)
* modules/http/http_protocol.c (make_allow): Don't check for the
  M_INVALID bit being set in the method mask if unregistered methods
  are allowed. That bit is never set by ap_method_list_add(), and this
  branch adding unregistered methods to Allow: never followed.

GitHub: closes apache#758, closes apache#428
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938291 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit d3a6a15)
* modules/filters/mod_substitute.c (do_pattmatch): Enforce max line
  length on unmatched tail.  Account for the unmatched tail after a
  successful substitution before emitting the result. This keeps
  SubstituteMaxLineLength effective for flattened literal substitutions
  and for both regular-expression paths.

Submitted by: Robert McConnell <robert mcc0nnell.org>
GitHub: closes apache#755

GitHub: closes apache#762
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938306 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 8983e3a)
* modules/mappers/mod_speling.c (check_speling): Decline if the
  filename's trailing component is longer than r->uri.

Submitted by: arshiya tabasum <arshi bugqore.com>
GitHub: closes apache#778

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938748 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit cbee25b)
  record using the received length rather than as a C string.

Submitted by: arshiya tabasum <arshi bugqore.com>
GitHub: closes apache#779

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938749 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit f7e3a01)
mod_socache_redis: Fix the unit of the RedisTimeout passed to the Redis
client.

* modules/cache/mod_socache_redis.c
  (RD_DEFAULT_SERVER_RWTO): Define in seconds rather than microseconds.
  (socache_rd_set_timeout): Convert the timeout from apr_time_t to whole
  seconds, rounding up so a positive value does not become 0.

Submitted by: Christophe JAILLET, Arturo Bernal <abernal apache.org>
GitHub: closes apache#790

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938833 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 8dbd283)
mod_authn_socache: Fix a crash on AuthnCacheProvideFor in htaccess
without AuthnCacheEnable:

* modules/aaa/mod_authn_socache.c (authn_cache_setprovider): Don't
  set configured from an htaccess file.

* changes-entries/authn_socache_htaccess.txt: New file.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit f85e7bf)
  (TestAllowMethods.test_core_009_03, TestAllowMethods.test_core_009_04),
  test/modules/filters/test_001_substitute_maxlen.py
  (TestSubstituteMaxLineLength.test_filters_001_01),
  test/modules/ssl/test_004_socache_redis.py
  (TestSocacheRedis.test_ssl_004_01): Mark as backported in 2.4.72.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@notroj
notroj merged commit c68d027 into apache:2.4.x Nov 25, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants