Add an example.
Synch with 2.4.x (syntax highlight) + secret introduced in 2.4.42.
Small doc rearrangement so that the "Beyond this list of basic attributes" is actually after the description of all items.
Add some missing hyper links to directives.
Remove some <var> in <syntax> to be more consistant with the rest of the doc.
Remove a duplicated traling ".".
* When ap_cstr_casecmp[n] have been introduced, in r1747469, it has
introduced many differences between 2.4.x and trunk.
Direct backporting was not that easy because:
- it was initialy introduced as ap_casecmpstr[n] with several patches
- it touched some files that were not in 2.4.x branch
Later, parts of it have already been backported.
This patch tries to clean all this.
Submitted by: many people
Reviewed by: jailletc36, minfrin, ylavic
Backported by: jailletc36
Graham Leggett [Sun, 17 Jan 2021 17:07:42 +0000 (17:07 +0000)]
Backport to v2.4:
*) Easy patches: synch 2.4.x and trunk
- mod_dav: save a few cycles
- mod_{ssl,md}: init_stapling_status hooks should return an int
- util_md5: avoid temporary stack result in ap_md5_binary()
- mod_proxy_balancer: Add a missing </tr>
- mod_md: get_stapling_status hooks should return an int
- mod_session: Improve a message about SessionExpiryUpdateInterval values
trunk patch:
http://svn.apache.org/r1837388
http://svn.apache.org/r1876549
http://svn.apache.org/r1877551
http://svn.apache.org/r1882210
http://svn.apache.org/r1882399
http://svn.apache.org/r1883414
2.4.x patch: svn merge -c 1837388,1876549,1877551,1882210,1882399,1883414 ^/httpd/httpd/trunk .
+1: jailletc36, ylavic, minfrin
Graham Leggett [Sun, 17 Jan 2021 16:41:47 +0000 (16:41 +0000)]
Backport to 2.4:
*) mod_proxy: common spooling code to allow mod_proxy_fgci proxy-sendcl. BZ 57087
trunk patch: https://svn.apache.org/r1884067
https://svn.apache.org/r1884068
https://svn.apache.org/r1884069
https://svn.apache.org/r1884070
2.4.x patch: http://people.apache.org/~ylavic/patches/2.4.x-mod_proxy_fcgi-sendcl-5on5.patch
https://github.com/apache/httpd/pull/162
+1: ylavic, covener, minfrin
ylavic: Long standing BZ (always send Content-Length, according to the CGI
specs) which is addressed by reusing mod_proxy_http's spooling
code (moved to proxy_util) in mod_proxy_fcgi. The user still needs
to SetEnv proxy-sendcl for that (2.4 compat).
Graham Leggett [Sun, 17 Jan 2021 16:21:35 +0000 (16:21 +0000)]
Backport to v2.4:
*) mod_proxy_http: handle upgrade/tunneling protocols. BZ 61616 is about
mod_proxy_connect but there has been wstunnel reports
on dev@ about that too lately.
trunk patch: https://svn.apache.org/r1678771
https://svn.apache.org/r1832348
https://svn.apache.org/r1869338
https://svn.apache.org/r1869420
https://svn.apache.org/r1878367
https://svn.apache.org/r1877557
https://svn.apache.org/r1877558
https://svn.apache.org/r1877646
https://svn.apache.org/r1877695
https://svn.apache.org/r1879401
https://svn.apache.org/r1879402
https://svn.apache.org/r1880200
https://svn.apache.org/r1885239
https://svn.apache.org/r1885240
https://svn.apache.org/r1885244
2.4.x patch: http://people.apache.org/~ylavic/patches/2.4.x-mod_proxy_http-upgrade-4on5-v2.patch
https://github.com/apache/httpd/pull/158
+1: ylavic, covener, minfrin
ylavic: All the corresponding trunk changes to mod_proxy_wstunnel (but
r1885239) have been dropped for this backport proposal, the goal
being to handle upgrade in mod_proxy_http from now, while r1885239
allows to benefit from the Upgrade improvements done in proxy_http
with existing wstunnel configurations (provided mod_proxy_http
module is loaded).
Graham Leggett [Sat, 16 Jan 2021 14:22:41 +0000 (14:22 +0000)]
Backport 2.4:
*) mod_proxy_http: individual status codes for ProxyErrorOverride. BZ 63628
trunk patch: https://svn.apache.org/r1754974
https://svn.apache.org/r1754975
https://svn.apache.org/r1876404
https://svn.apache.org/r1877696
https://svn.apache.org/r1877697
https://svn.apache.org/r1877728
2.4.x patch: http://people.apache.org/~ylavic/patches/2.4.x-mod_proxy_http-override-3on5.patch
https://github.com/apache/httpd/pull/157
+1: ylavic, covener, minfrin
ylavic: Besides ProxyErrorOverride individual status codes, merging now
the non-functional changes in ap_proxy_http_process_response()
around ProxyErrorOverride code helps reducing conflicts with the
following commits, and with trunk/2.4 alignment still.
Graham Leggett [Sat, 16 Jan 2021 14:08:29 +0000 (14:08 +0000)]
Backport to 2.4:
*) core: output filtering improvements (ease following patches, align trunk/2.4)
trunk patch: https://svn.apache.org/r1836032
https://svn.apache.org/r1884295
https://svn.apache.org/r1884296
https://svn.apache.org/r1884304
https://svn.apache.org/r1836237
https://svn.apache.org/r1836258
https://svn.apache.org/r1836354
https://svn.apache.org/r1843939
2.4.x patch: http://people.apache.org/~ylavic/patches/2.4.x-core_output_filtering-2on5.patch
https://github.com/apache/httpd/pull/156
+1: ylavic, covener, minfrin
ylavic: These core output filter changes are needed for the proxy
tunneling loop to work properly/non-blocking (PR 158 below). They
do not include the major filter setaside/reinstate changes from
trunk, reluing on existing 2.4 c->data_in_{input,output}_filter
flags only.
Graham Leggett [Sat, 16 Jan 2021 13:03:49 +0000 (13:03 +0000)]
Backport to 2.4:
*) core: Make writing the pidfile atomic to avoid startup failures
after (e.g.) system crashes, but also races with multiple
concurrent "httpd -k restart" runs which have a race between
reading and writing a fresh pidfile.
trunk patch: https://svn.apache.org/r1875153
https://svn.apache.org/r1875240
https://svn.apache.org/r1877645
2.4.x patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/163.patch
+1: jorton, covener, ylavic
Yann Ylavic [Tue, 5 Jan 2021 10:30:09 +0000 (10:30 +0000)]
Merge r1883744 from trunk:
mod_proxy: pconf vs pchild consistency, and correctness in ONE_PROCESS mode.
Consistently use pconf for ap_proxy_define_{worker,balancer}() and pchild for
ap_proxu_initialize_{worker,balancer}() in mod_proxy [child_]init code.
pchild is needed in _initialize() for mutexes/shms' child_init and cleanup,
and to avoid a crash on shutdown (i.e. ap_terminate) in ONE_PROCESS mode,
where worker->cp->pool is destroyed twice, let's register conn_pool_cleanup()
as a pre_cleanup of pchild.
Yann Ylavic [Tue, 5 Jan 2021 10:23:21 +0000 (10:23 +0000)]
Merge r1883729 from trunk:
core: fix c->client_ip for unix socket connections.
Catch apr_socket_addr_get() error in core_create_conn() to avoid uninitialized
conn_rec->client_ip. This can happen for mod_proxy connections using unix
sockets, which are not handled by apr_socket_addr_get() until APR's r1883728
(trunk only for now).
Yann Ylavic [Tue, 5 Jan 2021 10:20:45 +0000 (10:20 +0000)]
Merge r1883704, r1883707 from trunk:
mod_proxy_http2: thread safety with MPM prefork, still..
The allocator of pchild has no mutex with MPM prefork, but we need one
for h2 workers threads synchronization.
Even though mod_http2 shouldn't be used with prefork, better be safe than
sorry, so forcibly set the mutex in h2_child_init() if it doesn't exist.
This prevents the below situation:
AddressSanitizer: heap-use-after-free on address 0x6250003ea938 at pc 0x7fe229f40f3c bp 0x7fe22146dd30 sp 0x7fe22146dd28
WRITE of size 8 at 0x6250003ea938 thread T4
#0 0x7fe229f40f3b in apr_pool_destroy memory/unix/apr_pools.c:1015
`-> if ((*pool->ref = pool->sibling) != NULL)
#1 0x7fe229f6ef1a in apr_thread_exit threadproc/unix/thread.c:206
#2 0x7fe223a26671 in slot_run /home/yle/src/apache/httpd/trunk.ro/modules/http2/h2_workers.c:248
#3 0x7fe229f6ebcc in dummy_worker threadproc/unix/thread.c:142
#4 0x7fe229ecbea6 in start_thread nptl/pthread_create.c:477
#5 0x7fe229df9d4e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfdd4e)
0x6250003ea938 is located 56 bytes inside of 8192-byte region [0x6250003ea900,0x6250003ec900)
freed by thread T6 here:
#0 0x7fe22a1ecb6f in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9b6f)
#1 0x7fe229f3fe38 in allocator_free memory/unix/apr_pools.c:507
#2 0x7fe229f4107b in apr_pool_destroy memory/unix/apr_pools.c:1043
#3 0x7fe229f6ef1a in apr_thread_exit threadproc/unix/thread.c:206
#4 0x7fe223a26671 in slot_run /home/yle/src/apache/httpd/trunk.ro/modules/http2/h2_workers.c:248
#5 0x7fe229f6ebcc in dummy_worker threadproc/unix/thread.c:142
#6 0x7fe229ecbea6 in start_thread nptl/pthread_create.c:477
mod_proxy_http2: follow up to r1883704.
For event/worker MPMs, pchild uses pconf's allocator, so its is NULL.
While at it, removes the "based on the value of" because, it is not really based on the value of the environment variable, but on its existence or not.
PR 65048
(r1885046 on trunk)
While at it, remove some trailing spaces and add some "" to improve syntax color highlighting.