Eric Covener
be417c2c1e
Update the comment and checks around address/connection reusability
...
in mod_proxy.
The checks and comment are a vestige of 2.0.x
mod_proxy_http where the backend proxy conn was stored in
the frontend r->conn_config, but ap_proxy_determine_connection()
doesn't associate the frontend and backend conns like this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227642 13f79535-47bb-0310-9956-ffa450edef68
2012-01-05 15:45:01 +00:00
Stefan Fritsch
76f782e188
Various code cleanup to avoid compiler, cppcheck, or clang warnings:
...
modules/debugging/mod_firehose.c: Make some internal functions static
(to do: logs_cleanup() is unused)
modules/filters/mod_charset_lite.c: Remove dead assignments
modules/filters/mod_include.c: likewise
modules/metadata/mod_usertrack.c: likewise
modules/proxy/mod_proxy_ftp.c: likewise
modules/ssl/ssl_engine_pphrase.c: likewise
modules/proxy/mod_proxy_balancer.c: likewise;
Remove NULL check that can never happen
modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it
would, it would just mask another bug
os/unix/unixd.c: likewise
modules/http/http_filters.c: Remove sub-condition that is always true
modules/lua/mod_lua.c: Add default cases to switch statements
modules/generators/mod_autoindex.c: Unsigned value can never be < 0
server/util_expr_eval.c: Fix compiler warnings with VC and on OS2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1220493 13f79535-47bb-0310-9956-ffa450edef68
2011-12-18 17:52:59 +00:00
Graham Leggett
411fceeda5
mod_proxy: Remove dead code ap_proxy_table_unmerge().
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209952 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 17:09:58 +00:00
Graham Leggett
d404b51f31
mod_proxy: Remove ap_proxy_make_fake_req() from the public API.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209916 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 14:39:51 +00:00
Graham Leggett
f2f321ff8c
mod_proxy: Remove dead code.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209910 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 13:38:26 +00:00
Graham Leggett
1a7b79088b
mod_proxy: Make sure we populate the client IP from the peer IP for proxy
...
fake requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209814 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 01:08:59 +00:00
Graham Leggett
3ab3e5ed3e
mod_proxy: Remove ap_proxy_date_canon() from the public API.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209812 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 01:03:08 +00:00
Graham Leggett
e45341af5d
mod_proxy: Remove ap_proxy_buckets_lifetime_transform() from the public API.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209811 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 00:57:19 +00:00
Graham Leggett
9abaf845ca
mod_proxy: Remove ap_proxy_liststr(), it duplicates ap_find_token().
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209797 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 00:30:06 +00:00
Graham Leggett
a81bd8f675
mod_proxy: Move ap_proxy_string_read() out of the public API into
...
mod_proxy_ftp.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209776 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:18:39 +00:00
Stefan Fritsch
92e366007c
Add lots of unique tags to error log messages
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Graham Leggett
0182b1654f
mod_proxy: Make ap_proxy_retry_worker() into an optional function. Allows
...
mod_lbmethod_bybusyness, mod_lbmethod_byrequests, mod_lbmethod_bytraffic
and mod_lbmethod_heartbeat to be loaded without mod_proxy yet being present,
which happens when modules are loaded in alphabetical order.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209754 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 22:42:39 +00:00
Jim Jagielski
1eeb516b64
Use 2 sep hashing functions to account for collisions...
...
Safe enough
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208897 13f79535-47bb-0310-9956-ffa450edef68
2011-12-01 00:02:30 +00:00
Jim Jagielski
619f36bf80
Ensure casing doesn't matter... (we know balancer->s->name is
...
lc)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208069 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 21:14:47 +00:00
Jim Jagielski
e13a723904
Some optimization... we have a hash, use it. Quicker than all
...
these string comparisons.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208068 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 21:14:08 +00:00
Jim Jagielski
d2e320f509
Logic which makes the balancer "active" or not... so we can turn them
...
off and on as needed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207926 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 15:36:11 +00:00
Jim Jagielski
ef5be92f5e
Pull this out as a sep function to allow for full vhosting
...
adjustment between get and define balancers...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207562 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 20:11:44 +00:00
Jim Jagielski
c4ec235bb0
"Final" (I hope) proxy struct/API changes in order to support
...
dynamic balancer allocation AND dynamic vhost-balancers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207467 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 17:10:17 +00:00
Jim Jagielski
b896ababf5
Error-check.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207282 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 15:11:03 +00:00
Jim Jagielski
984c3a345c
Move useful and shared balancer stuff to the shm slot...
...
Provide hooks for post-config/runtime addition of
balancers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206286 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 19:28:14 +00:00
Jim Jagielski
fa862b3f7e
Allow compile time changes of field sizes and be more
...
"clear" regarding the diff between balancer and worker slots...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1206268 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 17:32:03 +00:00
Jim Jagielski
846dd30b32
Never used.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204553 13f79535-47bb-0310-9956-ffa450edef68
2011-11-21 15:51:40 +00:00
Stefan Fritsch
2bd6f96a1a
Log fatal errors at level CRIT, not at some random level from DEBUG to EMERG
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203868 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:49:44 +00:00
Stefan Fritsch
8ec7f5c5bf
great proxy logging cleanup:
...
* remove "proxy:", "FCGI", etc. prefixes and pid which are now
included in the error log format
* propagate frontend request's logconfig to backend request
* use ap_log_rerror where possible
* remove obsolete APLOG_NOERRNO
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203859 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:41:09 +00:00
Stefan Fritsch
8da8c26cd1
Modify placement of PROXY_DECLARE_DATA to fix build problems with MSVC,
...
reported by Gregg L. Smith
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1196946 13f79535-47bb-0310-9956-ffa450edef68
2011-11-03 05:35:51 +00:00
Stefan Fritsch
40b2bb8f92
There is absolutely no reason to have two 4k-sized constant strmatch patterns
...
in each per-dir config.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1183475 13f79535-47bb-0310-9956-ffa450edef68
2011-10-14 19:51:17 +00:00
Stefan Fritsch
14db7672ac
Remove ap_proxy_removestr(). It has been unused for a decade and has quadratic
...
memory usage.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180654 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 17:07:17 +00:00
Stefan Fritsch
1951a037bf
More cleanup: Expand tabs and some more indentation fixes
...
No functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Stefan Fritsch
037e42fb4d
Save one call of ap_escape_html on the uri. Reflow code to be more readable.
...
Submitted by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
PR: 51697
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1173328 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 20:12:51 +00:00
Stefan Fritsch
01ed21af9d
Add wrappers for malloc, calloc, realloc that check for out of memory
...
situations. Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.
PR 51568, PR 51569, PR 51571.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00
Nick Kew
9da1f57443
mod_proxy: enable absolute URLs to be rewritten with ProxyPassReverse,
...
e.g. to reverse proxy "Location: https://other-internal-server/login " with
ProxyPassReverse https://public-address/ https://other-internal-server/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1152273 13f79535-47bb-0310-9956-ffa450edef68
2011-07-29 15:40:19 +00:00
Stefan Fritsch
51692222f6
Various code cleanup
...
PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
2011-06-22 20:45:34 +00:00
Stefan Fritsch
f66af00c19
Avoid some memory allocations by using apr_table_setn where the string
...
arguments are const.
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51357
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135083 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 10:58:10 +00:00
Stefan Fritsch
65c04f6b24
Replace some "apr_p[c]alloc / memcpy" constructions into a single apr_pmemdup()s
...
PR: 51214
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125818 13f79535-47bb-0310-9956-ffa450edef68
2011-05-21 21:06:15 +00:00
Jim Jagielski
5c1603996e
If we change the LB method, or we take add in a new
...
balancermember ("enable" her), then we need to have the
LBmethod reset its params as required...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087371 13f79535-47bb-0310-9956-ffa450edef68
2011-03-31 17:00:36 +00:00
William A. Rowe Jr
534cbfe22c
Resolve disagreement with its prototype
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086287 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 15:50:34 +00:00
Jim Jagielski
aac783bdf5
No longer depend on how fork() works when laying out segments...
...
function pointers in shm are... nasty ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1072098 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 18:40:25 +00:00
Jim Jagielski
1d0800cd28
move function...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1069381 13f79535-47bb-0310-9956-ffa450edef68
2011-02-10 13:29:53 +00:00
Jim Jagielski
f67eea94fb
Ugg... unbalanced workers *do* need a mutex as well (good catch Rüdiger!)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068879 13f79535-47bb-0310-9956-ffa450edef68
2011-02-09 13:20:09 +00:00
Jim Jagielski
84a5c9cd6f
Remove the thread mutex from the worker... it really should be
...
in the balancer. Thus we have global and thread for the balancer.
Use global when updating the full, shm list of workers; use
thread when being local.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068581 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 21:08:10 +00:00
Jim Jagielski
55b9f8fba8
Here we go... we can now, via balancer-manager, add new
...
workers to existing balancers. Still work to be done,
like error checking that we aren't trying to add more
than we can (right now, it fails, but it would be nice
to handle it nicer), disabling and *deleting* workers
we don't want anymore, the actual drain method, etc...
but this is some major goodness.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067269 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 20:01:04 +00:00
Jim Jagielski
42f76d8265
No need to pollute the whole namespace...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066631 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 21:25:34 +00:00
Jim Jagielski
ee5eda1b71
Optimize... create a struct to hold the worker status info
...
(need to align w/ set_params later on) and note when we
update timestamps
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066607 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 20:17:22 +00:00
Jim Jagielski
f2c6805bc9
Again, abstract out the worker status magic to it's handled
...
by funcs...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066138 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 19:07:02 +00:00
Jim Jagielski
6c0a4fc5da
Move the setting of flags into a func... that way there is
...
one place to maintain as the number of flags grow...
Since we are using just the bits, make unsigned.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066110 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 18:13:15 +00:00
Jim Jagielski
177e4e5f86
Move the lbmethod to also allow it to be adjusted runtime
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065750 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:29:01 +00:00
Jim Jagielski
12ae415dbe
Move some "nice to be able to change" balancer stuff to shm
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065748 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:28:52 +00:00
Jim Jagielski
31c4a9e21e
Move nonce to balancer struct and add logic for nonce and growth.
...
Adjust mmn and update doccos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058629 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:22 +00:00
Jim Jagielski
68704e1435
Set some defaults... do it here @ worker creation, not initialization
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058627 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:13 +00:00
Jim Jagielski
ddebc67a4e
whitespace
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058626 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:10 +00:00