The cache entry for the first request is committed by the CACHE_SAVE
filter on the EOS-only pass that follows the body, which can still be
running server side for an instant after the client has already read
the complete body. Two back-to-back requests with no delay can race
this, making the second one miss the cache and hit the backend again.
Give the commit room to land before relying on it, instead of
asserting immediately after the first request returns. Reproduced
locally (about 1 in 5 runs failing, on different parametrized cases
each time, none of them involving a comma) and confirmed fixed (0
failures in 55 runs) before and after this change.
Also harden the TCPFaker backend used by this test to close its
socket with an orderly shutdown() instead of an abrupt close(), which
removes one more way for a slow platform to see a reset instead of a
clean end of response.
GitHub: closes#864
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939305 13f79535-47bb-0310-9956-ffa450edef68
* server/util.c (ap_size_parameter_parse): Allow an optional
case-insensitive 'b', 'k', 'm' or 'g' suffix, bounding the
multiplication by the range of apr_off_t.
* include/httpd.h: Update doxygen accordingly.
* test/unit/util.c (size_parameter_parse_handles_suffixes): New test.
* test/modules/core/test_012_config_off_t.py: Update for suffix
support.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GitHub: PR #851
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939295 13f79535-47bb-0310-9956-ffa450edef68
cache_strqtok() did not end a token at a comma or whitespace unless an
argument followed, so "private, no-store" was read as one token and the
response was stored. Stop at any non-token character, after the '='
test.
This is a trunk-only regression from r1856507, which rewrote the
tokenizer as a state machine and dropped the T_HTTP_TOKEN_STOP check in
the token state that r1856493 and r1856500 still had.
PR: 70028
GitHub: closes#821
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939267 13f79535-47bb-0310-9956-ffa450edef68
Stop reading (and writing) one byte past the end of a file
description when it ends inside an unterminated "&" entity or "<"
tag, as a ScanHTMLTitles title can.
* modules/generators/mod_autoindex.c (terminate_description): Check
for the terminating NUL before advancing past it when scanning an
unterminated "<" tag or "&" entity, and break out of the loop at
end of string rather than continuing past it.
* test/modules/generators/env.py (GeneratorsTestSetup.__init__): Load
mod_autoindex for the generators test suite.
* test/modules/generators/htdocs/autoindex/: New test content.
* test/modules/generators/test_002_autoindex.py (TestAutoindex): New
test that a ScanHTMLTitles description ending in a bare "&" is
rendered without reading past the end of the description.
Submitted by: arshiya tabasum <arshi bugqore.com>
GitHub: closes#812
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939181 13f79535-47bb-0310-9956-ffa450edef68
to a script from 256 to APACHE_ARG_MAX, and bound URI/query/env-value
lengths against the configured request limits rather than APR_PATH_MAX.
PR 70270.
* changes-entries/cgid-env-limit.txt: Add changelog entry.
* modules/generators/mod_cgid.c: Replace ENV_COUNT_MAX with ENV_VAL_MAX,
a sanity bound on the length of a single environment variable value.
(get_req): Take the main server_rec as an argument. Allow up to
APACHE_ARG_MAX environment variables; check uri_len and args_len
against the configured LimitRequestLine rather than APR_PATH_MAX;
check each environment variable value against ENV_VAL_MAX.
(send_req): Fail with APR_ENOSPC if more than APACHE_ARG_MAX
environment variables are present.
(cgid_server): Pass main_server to get_req.
* test/modules/generators/htdocs/cgi/: New tests scripts.
* test/modules/generators/test_001_cgid.py: New tests.
Submitted by: Emmanuel Dreyfus <manu netbsd.org>, jorton
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GitHub: closes#850
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939165 13f79535-47bb-0310-9956-ffa450edef68
ap_size_parameter_parse() returned APR_ERANGE for a value without any
digits where the libc sets EINVAL when nothing is converted (FreeBSD,
musl), and APR_EINVAL with glibc. end == parameter tells portably that
nothing was converted, so check it before the apr_strtoff() status.
APR_EINVAL is for invalid syntax, APR_ERANGE stays for overflow and
underflow.
Use it for LimitXMLRequestBody too, which had its own apr_strtoff()
parsing from #825, so that it reports the same errors as
LimitRequestBody on every platform. No change in the accepted values.
Extend test_012 to check that LimitRequestBody reports invalid syntax
and range errors with their own messages, and to cover
LimitXMLRequestBody.
GitHub: closes#848
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939163 13f79535-47bb-0310-9956-ffa450edef68
h2_session_shutdown() passed its reason, an APR or nghttp2 status, as the
error code of the GOAWAY frame. A connection timeout was sent as 70007
(APR_TIMEUP), an inadequate TLS connection as 22 (APR_EINVAL).
Give h2_session_shutdown() the HTTP/2 error code as a separate argument.
Timeouts and graceful shutdowns send NO_ERROR, failures INTERNAL_ERROR
and inadequate TLS parameters INADEQUATE_SECURITY.
PR: 70212
GitHub: closes#799
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939156 13f79535-47bb-0310-9956-ffa450edef68
dav_method_options() builds its own Allow field and unconditionally
advertised TRACE for existing DAV resources, even when TraceEnable was
off.
Respect TraceEnable when constructing the DAV Allow field.
PR: 70264
GitHub: closes#827
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939146 13f79535-47bb-0310-9956-ffa450edef68
Add ap_size_parameter_parse(), a helper to parse a configuration value
as an apr_off_t, which fails on trailing characters and on overflow.
The range of the value remains up to the directive.
Use it for configuration directives which parsed such values in
different ways, some of them accepting trailing characters or doing no
checks at all: LimitRequestBody (unchanged behavior), ScriptLogLength,
ScriptLogBuffer, DavQuota, BufferSize, AuthFormSize, and the
mod_cache_disk and mod_cache_socache size and time directives.
GitHub: closes#829
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939129 13f79535-47bb-0310-9956-ffa450edef68
set_limit_xml_req_body() used atol(), so "abc123" and "123abc" were
accepted as 0 and 123, and a value out of range of a long gave an
undefined result. Parse the whole argument with apr_strtoff() like
LimitRequestBody, and reject values that do not fit in limit_xml_body
or exceed AP_MAX_LIMIT_XML_BODY.
PR: 69975
GitHub: closes#825
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939121 13f79535-47bb-0310-9956-ffa450edef68
inside the client hash table:
* modules/aaa/mod_auth_digest.c (struct hash_table): Hold the counter here
as a 64-bit otn_counter, issued under client_lock like next_id rather
than with 32-bit atomics (apr_atomic_inc64 is not available on the
minimum APR).
(initialize_tables): Seed it; drop its separate shared-memory allocation.
(gen_nonce): Issue the ordinal under client_lock.
(set_shmem_size): Account for two allocations rather than three.
* test/modules/aaa/test_006_config_errors.py
(test_digest_069_shmemsize_no_room_for_entry_rejected): Adjust for the
smaller minimum.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: close#787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939038 13f79535-47bb-0310-9956-ffa450edef68
* modules/aaa/mod_auth_digest.c (set_shmem_size): Parse with apr_strtoff,
reject overflow and trailing junk, and require room for the table, the
counter, and at least one entry including rmm overhead.
* test/modules/aaa/test_006_config_errors.py
(test_digest_068_shmemsize_trailing_junk_rejected,
test_digest_069_shmemsize_no_room_for_entry_rejected): New.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: PR #787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939036 13f79535-47bb-0310-9956-ffa450edef68
The domain was suppressed for any proxy request, but a reverse-proxied
request authenticates to this server with an origin-style
WWW-Authenticate, so AuthDigestDomain applies to it as it does to a
non-proxied request; only a forward-proxy (PROXYREQ_PROXY) request, whose
challenge is Proxy-Authenticate, should omit it.
* modules/aaa/mod_auth_digest.c (note_digest_auth_failure): Suppress
domain= only for PROXYREQ_PROXY, matching the rest of the file.
* test/modules/aaa/env.py: Load mod_proxy and mod_proxy_http.
* test/modules/aaa/conftest.py: Add a reverse-proxied location which
authenticates with Digest and sets AuthDigestDomain.
* test/modules/aaa/test_013_proxy_domain.py: New test suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: PR #787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939035 13f79535-47bb-0310-9956-ffa450edef68
* modules/aaa/mod_auth_digest.c (copy_uri_components): Return the
ap_unescape_url status rather than discarding it.
(authenticate_digest_user): Fail the request when the request-target or
the Authorization uri does not unescape.
* test/modules/aaa/test_001_challenge_response.py
(test_digest_015_uri_bad_escaping_rejected): New.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: PR #787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939034 13f79535-47bb-0310-9956-ffa450edef68
* modules/aaa/mod_auth_digest.c (digest_header_rec): Add nc, the parsed
nonce-count.
(parse_digest_header): Require nc to be 8 hex digits (RFC 7616 3.4) and
store its value, so it is well-formed everywhere it is used or echoed.
(check_and_record_nonce): Use the parsed value; drop the local strtol
and the now-unreachable AH01773.
* test/modules/aaa/test_003_nccheck.py
(test_digest_036_malformed_nc_rejected,
test_digest_037_malformed_nc_does_not_poison_client): New.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: PR #787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939033 13f79535-47bb-0310-9956-ffa450edef68
The per-request record is created in a post_read_request hook, which does
not run for a request rejected earlier (e.g. no Host on HTTP/1.1). An
ErrorDocument directing such a request into a Digest-protected location
then reached the auth hooks, which walked ->prev to the original request
and used its record without checking it had been created.
* modules/aaa/mod_auth_digest.c (make_digest_rec): New, split from
init_digest_request, storing the record on a given request.
(get_digest_rec): New; walk to the shared record and create it if the
originating request never ran init_digest_request.
(authenticate_digest_user, hook_note_digest_auth_failure): Use it in
place of the open-coded walk, which did not check for a missing record.
* test/modules/aaa/conftest.py: Add an ErrorDocument 400 into a
Digest-protected location.
* test/modules/aaa/test_012_errordoc.py: New test suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GitHub: PR #787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939032 13f79535-47bb-0310-9956-ffa450edef68
* modules/aaa/mod_auth_digest.c (client_id_t): Widen to apr_uint64_t.
(CLIENT_ID_MAX): New.
(initialize_tables): Cap the seed at CLIENT_ID_MAX.
(client_generate): Issue ids in 1..CLIENT_ID_MAX.
(client_exists, client_update_nonce, client_generate): Log ids with
APR_UINT64_T_FMT.
(parse_digest_header): Parse the opaque with apr_strtoi64(), returning
INVALID if it is not in 1..CLIENT_ID_MAX.
(authenticate_digest_user): Remove the now-unreachable invalid opaque
check (AH01787); mention an invalid opaque in AH01782.
(ltox): Rename to...
(client_id_to_opaque): ...this; format with APR_UINT64_T_HEX_FMT.
(note_digest_auth_failure): Update callers.
* test/modules/aaa/test_001_challenge_response.py
(test_digest_013_invalid_opaque): Accept AH01782 as well as AH01787.
* test/modules/aaa/test_003_nccheck.py
(test_digest_035_out_of_range_opaque_is_not_truncated): Try opaques
2^32 and 2^64 above the live id.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GitHub: PR #787
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1939031 13f79535-47bb-0310-9956-ffa450edef68
failing configuration with httpd -t, and return its stderr;
apachectl_stderr is not set on Windows.
(test_filters_003_32, test_filters_003_35, test_filters_003_38,
test_filters_003_39, test_filters_003_40, test_filters_003_42,
test_filters_003_44, test_filters_003_45, test_filters_003_46): Use it.
* changes-entries/sed-fixes.txt: Add entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub: closes#791
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938966 13f79535-47bb-0310-9956-ffa450edef68
* modules/filters/sed0.c (fcomp): Reject { nested more than SED_DEPTH
deep, and an s or y command with no delimiter.
(ycomp): Index the translation table by the unsigned value of each
byte.
(comple): Return NULL from a failed compile without storing circf.
(address): Reject a line number too large for apr_int64_t.
* test/modules/filters/test_003_sed.py (test_filters_003_37,
test_filters_003_38, test_filters_003_42, test_filters_003_43,
test_filters_003_44, test_filters_003_46, test_filters_003_47): New
tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub: PR #791
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938965 13f79535-47bb-0310-9956-ffa450edef68
Content-Length request header; unset it after reading from the next
filter.
* test/pyhttpd/mod_aptest/mod_aptest.c (aptest_getline_echo): Buffer
the body, and return the Content-Length request header left after
reading it in an AP-Test-Content-Length response header.
* test/modules/filters/test_003_sed.py (test_filters_003_34): New test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub: PR #791
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938964 13f79535-47bb-0310-9956-ffa450edef68
AP_MODE_GETLINE reads, returning a line of the filtered body; fail
other modes besides AP_MODE_READBYTES with APR_ENOTIMPL. Always
read with AP_MODE_READBYTES from the next filter.
* test/pyhttpd/mod_aptest/mod_aptest.c (aptest_getline_echo): New
handler.
(aptest_hooks): Register it.
* test/modules/filters/test_003_sed.py (test_filters_003_33): New test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub: PR #791
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938963 13f79535-47bb-0310-9956-ffa450edef68
* modules/filters/regexp.c (sed_compile): Reject \{m,n\} following
anything but a character, "." or a bracket expression, or following
another \{m,n\}. Track which groups have been closed rather than how
many, and check \N against that. Reject a bracket expression which
ends after a range's "-". Treat a NUL as a missing delimiter.
Compare the delimiter as an unsigned char. Check the \{m,n\} count
limit as each digit is read.
(regerr): Add error 47.
* test/modules/filters/test_003_sed.py (TestSed.configure): Add fails
argument. Write directives given as bytes to a file of their own and
Include it.
(test_filters_003_31, test_filters_003_32, test_filters_003_35,
test_filters_003_36, test_filters_003_39, test_filters_003_40,
test_filters_003_41, test_filters_003_45): New tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub: PR #791
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938962 13f79535-47bb-0310-9956-ffa450edef68
* test/modules/aaa/test_012_truncated_nonce.py
(TestDigestTruncatedNonce.test_digest_012_01): New test. Request a
Digest challenge, truncate the nonce by stripping the base64 time
prefix up to the '=', and send an Authorization header built with the
truncated nonce. Expect a 401 response and ignore the logged AH01782
error.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Submitted by: Paul Lodge <plodge redhat.com>
GitHub: closes#798
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938930 13f79535-47bb-0310-9956-ffa450edef68
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
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 <abernal apache.org>
GitHub: closes#790
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938833 13f79535-47bb-0310-9956-ffa450edef68
* modules/http2/h2_stream.c (h2_stream_create_input): do not reject a
':path' of '*' with a ':scheme' present when the method is OPTIONS
over http/https; pass the asterisk-form through as is.
* test/modules/http2/test_203_rfc9113.py (test_h2_203_03_options_asterisk,
test_h2_203_04_invalid_path): Add tests.
Submitted by: Arturo Bernal <abernal apache.org>
PR: 70195
GitHub: closes#788
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938821 13f79535-47bb-0310-9956-ffa450edef68
* test/modules/proxy/env.py (ProxyBackend._process): read 8192 bytes
on Windows and 4096 elsewhere to avoid short reads on win32.
Submitted by: Paul Lodge <paullodge outlook.com>
GitHub: closes#785
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938786 13f79535-47bb-0310-9956-ffa450edef68
* CMakeLists.txt: Add mod_proxy_uwsgi, linked against mod_proxy.
Change mod_mime_magic from optional to included by default.
* test/modules/proxy/test_03_uwsgi.py: Remove duplicate copy of the
module appended after the first.
(_proxy_uwsgi_setup): Add LogLevel trace4.
* test/modules/proxy/uwsgi_faker.py: Remove duplicate copy of the
module appended after the first.
Submitted by: Paul Lodge <paullodge outlook.com>
GitHub: closes#781
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938757 13f79535-47bb-0310-9956-ffa450edef68
* modules/generators/mod_cgid.c (cgid_server): Log the daemon's pid
at TRACE1 (so the tests can kill the daemon).
* test/modules/generators/: New test suite.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GitHub: closes#772
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938602 13f79535-47bb-0310-9956-ffa450edef68
* modules/filters/sed0.c (ycomp): Stop parsing after reporting
SEDERR_TSNTSS when the destination string is shorter than the
source string. Previously the loop kept advancing tsp past the
closing delimiter and past the NUL terminator of the command
line, reading beyond the end of linebuf and eventually reporting
a bogus "ending delimiter missing" error.
Submitted by: Ankit Prateek <ankit offbyquant.com>
* test/modules/filters/test_002_sed_ycomp.py: New test. Check that
y/// commands with unequal string lengths are rejected with the
size-mismatch error rather than the delimiter error, in both
directions, and that a well-formed y/// still compiles and the
server starts. Skipped on Windows, where "httpd -k start" is
service control and fails before the configuration is read.
* test/modules/filters/env.py (FiltersTestSetup.__init__): Load
mod_sed.
(FiltersTestEnv.__init__): Add sed to the logged modules.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes#766, closes#678
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938337 13f79535-47bb-0310-9956-ffa450edef68
* modules/http2/h2_stream.c (h2_stream_add_header): Guard the AH10178,
AH10180 and AH10181 log messages on stream->request_headers_failed
rather than h2_stream_is_ready().
(h2_stream_end_headers): Likewise for AH10230.
Submitted by: Michael Kaufmann <mail michael-kaufmann.ch>
* test/modules/http2/test_111_header_limit_log.py: New test, checking
that AH10181 is logged exactly once for a request with many headers
over LimitRequestFields.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes#765, closes#666
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938328 13f79535-47bb-0310-9956-ffa450edef68
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#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>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938306 13f79535-47bb-0310-9956-ffa450edef68
"start" result rather than comparing the ExecResult to 0, which
never matched, so a started server was never waited for and could
race with the next test.
* test/modules/md/test_300_conf_validate.py (test_md_300_011a,
test_md_300_021): Expect the server to start, since an unmanaged
vhost name only logs a warning; this was hidden by the broken
apache_fail() check.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes#759
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938297 13f79535-47bb-0310-9956-ffa450edef68
trailing spaces using a one-past-the-end pointer, so the pointer is
never decremented to before the start of the buffer when the
token is empty. Test for an empty token with equality instead.
* test/modules/proxy/test_03_response.py (TestProxyResponse): Add
127.0.0.1 as a trusted RemoteIP proxy.
(test_proxy_03_004): Move after test_proxy_03_002.
(test_proxy_03_005): New test: an X-Forwarded-For header ending in
an empty token must still get a 200 response.
Submitted by: Robert McConnell <robert mcc0nnell.org>
GitHub: closes#756
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938292 13f79535-47bb-0310-9956-ffa450edef68
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>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938291 13f79535-47bb-0310-9956-ffa450edef68