1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

10 Commits

Author SHA1 Message Date
Jean-Frederic Clere
502faf44d5 Add --strict-optional to prevent success when missing modules.
Submitted by Maya Echtinaw

This closes #808



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939059 13f79535-47bb-0310-9956-ffa450edef68
2026-10-12 13:14:38 +00:00
Jean-Frederic Clere
f6b14daf42 Those are failing on my box.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938986 13f79535-47bb-0310-9956-ffa450edef68
2026-10-10 12:53:01 +00:00
Joe Orton
3f95bd3fe6 mod_remoteip: PROXY protocol: handle a peer going away before the header,
and test the LOCAL command.

* modules/metadata/mod_remoteip.c (remoteip_input_filter): Log EOF while
  reading the PROXY protocol header at info level, as the peer going away;
  other read errors are still logged as errors.  Skip metadata buckets
  rather than copying from them: the EOS bucket arriving before the EOF
  was passed to memcpy() as a NULL source.

* test/modules/metadata/test_004_remoteip.py (test_metadata_004_03,
  test_metadata_004_04, test_metadata_004_05, test_metadata_004_06): Test
  PROXY protocol v2 with the PROXY and LOCAL commands, with and without an
  address block, and a peer disconnecting after a partial header.

PR: 63893
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: closes #805


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938927 13f79535-47bb-0310-9956-ffa450edef68
2026-10-08 20:04:38 +00:00
Joe Orton
47717ee2e4 mod_remoteip: Apply RemoteIP{Trusted,Internal}ProxyList to the virtual host
they are configured in, and fix merging.

* modules/metadata/mod_remoteip.c
  (merge_remoteip_server_config): When both the main server and the virtual
  host have proxymatch_ip entries, merge the two arrays.
  (remoteip_hook_post_config): Log a warning (APLOGNO 10633) for each
  virtual host whose proxy entries were merged with the main server's.
  (remoteip_cmds): Drop EXEC_ON_READ from RemoteIPTrustedProxyList and
  RemoteIPInternalProxyList so the directives apply in the server/vhost
  scope they are configured in, rather than globally at config read time.

* test/modules/metadata/test_004_remoteip.py: New test.

* test/modules/metadata/env.py
  (MetadataTestSetup.__init__): Add remoteip to the optional modules.

PR: 70207
Submitted by: Arturo Bernal <abernal apache.org>
GitHub: closes #793


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938908 13f79535-47bb-0310-9956-ffa450edef68
2026-10-08 08:31:23 +00:00
Joe Orton
837965fd1e mod_env: Add the SetEnvFromFile directive:
* modules/metadata/mod_env.c (add_env_module_vars_from_file): New.
  (env_module_cmds): Add SetEnvFromFile.

* docs/manual/mod/mod_env.xml: Document SetEnvFromFile.

* test/modules/metadata/env.py (MetadataTestSetup.__init__): Load
  mod_env and mod_include, and enable their logging.

* test/modules/metadata/test_002_setenvfromfile.py: New tests.

Submitted by: Cornel Isbiceanu <cisbiceanu adobe.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: closes #750


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938506 13f79535-47bb-0310-9956-ffa450edef68
2026-09-24 20:55:45 +00:00
Joe Orton
e46400864c * test/modules/metadata/test_001_mime_magic.py: Add a regression test for
an indirect rule resolving to a negative offset.

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938261 13f79535-47bb-0310-9956-ffa450edef68
2026-09-15 16:27:31 +00:00
Joe Orton
547cccd1d8 * modules/metadata/mod_mime_magic.c (signextend): Sign-extend long
values from 32 bits, so that a rule value with the high bit set
  compares equal to the data with a 64-bit long.
  (mconvert): Store the assembled BELONG and LELONG value without
  sign extension.

* test/modules/metadata/test_001_mime_magic.py: Add tests for belong
  and ulelong rules with the high bit set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: PR #757


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938259 13f79535-47bb-0310-9956-ffa450edef68
2026-09-15 16:25:41 +00:00
Joe Orton
7fe179ee3a * test/modules/metadata/env.py: Load mod_mime_libmagic when built.
* test/modules/metadata/__init__.py,
  test/modules/metadata/samples.py,
  test/modules/metadata/test_002_mime_libmagic.py,
  test/modules/metadata/test_003_compare.py: New test suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: PR #757


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938257 13f79535-47bb-0310-9956-ffa450edef68
2026-09-15 16:25:19 +00:00
Joe Orton
af41fc3340 * test/modules/metadata/__init__.py: Missed in r1938070.
Fixes: 6926aa53b5


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938072 13f79535-47bb-0310-9956-ffa450edef68
2026-09-10 06:50:28 +00:00
Joe Orton
6926aa53b5 * modules/metadata/mod_mime_magic.c (rsl_strdup): Fix off-by-one which
included a trailing whitespace character in the copied string; simplify
  loop termination.
  (magic_rsl_to_request): Decline if the type is not of the form
  token/token; ignore an encoding which is not a valid token.
  (ascmagic): Don't append a note for content with escape sequences.

* test/modules/metadata/: New test suite.

* docs/log-message-tags/next-number: Bump.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: closes #751


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938070 13f79535-47bb-0310-9956-ffa450edef68
2026-09-10 06:24:37 +00:00