1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

284 Commits

Author SHA1 Message Date
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
3122ef26c6 mod_proxy: Move ap_proxy_strmatch_path and ap_proxy_strmatch_domain out of
the public API.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209947 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 16:45:29 +00:00
Graham Leggett
166ecfcc5f mod_proxy: Remove ap_proxy_make_fake_req() from the public API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209917 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 14:41:04 +00:00
Graham Leggett
35a6d8a2b5 mod_proxy: Remove dead PROXY_OPTIONAL_HOOK macro.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209913 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 14:09:54 +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
5259bb3f02 mod_proxy: Make the ap_proxy_is* functions private.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209908 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 13:29:05 +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
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
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
109bd135e1 Instead of running thru all kinds of logic paths, just add in
a on/off bit... No need for other balancer statuses(sp)?

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207863 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 13:12:43 +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
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
Guenter Knauf
9e3448f1c7 Removed prototype which had no implementation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1194940 13f79535-47bb-0310-9956-ffa450edef68
2011-10-29 17:30:36 +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
Jim Jagielski
a6f26af093 Implement draining capability for proxy workers... only accept
sticky on these puppies.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1170256 13f79535-47bb-0310-9956-ffa450edef68
2011-09-13 17:26:57 +00:00
Jim Jagielski
e075565180 Add in BalancerGrowth and its functionality... this lays
the framework for adding additional Balancers: post-config
by allowing for shm growth.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1125451 13f79535-47bb-0310-9956-ffa450edef68
2011-05-20 16:29:48 +00:00
Guenter Knauf
4be15ef43a Fixed only some proxy prototype formats.
Function names must follow the *_DECLARE() in the same
line regardless how long the function names are!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1088421 13f79535-47bb-0310-9956-ffa450edef68
2011-04-03 21:37:20 +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
Jeff Trawick
562c645ad6 change signed single-bit fields to unsigned
some of these were exposed to mods so the mmn is bumped, without
regard to whether any compiler will have to generate different
code


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086662 13f79535-47bb-0310-9956-ffa450edef68
2011-03-29 18:20:52 +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
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
f863547c32 Expose this as part of the API. That way, other code/modules
which want to overload mod_proxy's trans phase can use it to
handle ProxyPass as well, without requiring monkeying
with conf->aliases...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068400 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 13:59:36 +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
19a1fc4170 bitfields should be unsigned
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066112 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 18:14:37 +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
7b07c3822e tuck away code that lets us ensure that the id is always
"unique"

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065749 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:28:57 +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
Igor Galić
ceb1766d2d Add a patch from Vincent Deffontaines to make the adding of X-forwarded-*
headers configurable: ProxyAddHeaders, defaulting to 'On'.
http://www.mail-archive.com/dev@httpd.apache.org/msg49971.html


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060795 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 12:48:17 +00:00
Jim Jagielski
a713db09d4 Make the balancer shared memory slot more human readable. But we need
to make it a "safe" filename, so create 2 funcs which do that.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060657 13f79535-47bb-0310-9956-ffa450edef68
2011-01-19 02:41:49 +00:00
Rainer Jung
1a1c15a417 Align proxy_worker_shared in slotmem shm
using default APR alignment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060112 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 22:16:51 +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
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
Jim Jagielski
fab3678ad3 Builds and passes tests as prefork... good save state
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058625 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:05 +00:00
Jim Jagielski
9096c04779 Adjust for conf->workers being *proxy_worker and balancer->workers being **proxy_worker
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058624 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:02 +00:00
Jim Jagielski
201bbd1ba9 More movement to shared stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058623 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:57 +00:00