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
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
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
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