Jim Jagielski
2619a5308f
wtf are we doing merging in these from the parent??
...
These are server specific!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387603 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 14:17:03 +00:00
Jim Jagielski
1c55455c36
Use identifying server_rec info when we know we have
...
unique and useful data :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387444 13f79535-47bb-0310-9956-ffa450edef68
2012-09-19 03:51:25 +00:00
Jim Jagielski
53bf5b2c19
By using a consistent naming structure, we can persist
...
across stop/starts (assuming people don't change
such basics as scheme, hostname, etc...)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387287 13f79535-47bb-0310-9956-ffa450edef68
2012-09-18 18:02:31 +00:00
Jim Jagielski
664dd95af2
Persist local balancer-manager changes across restart/graceful.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1387110 13f79535-47bb-0310-9956-ffa450edef68
2012-09-18 12:15:50 +00:00
Stefan Fritsch
ea690c5e6f
remove obsolete comment (PROXY_MAGIC_TYPE is not used anywhere anymore)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1345329 13f79535-47bb-0310-9956-ffa450edef68
2012-06-01 20:04:44 +00:00
Ruediger Pluem
e948002f96
* Add the forcerecovery balancer parameter that determines if recovery for
...
balancer workers without considering the retry value of workers is enforced.
There might be cases where an already overloaded backend can get into deeper
trouble if the recovery of all workers is enforced without considering the
retry parameter of each worker
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1306409 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 15:22:40 +00:00
Ruediger Pluem
0dc16bb55e
* Readd the reverse assignment to avoid segfaults in ap_proxy_initialize_worker
...
PR: 52935
Obtained from: Petter Berntsen <petterb gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1302483 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 14:51:47 +00:00
Ruediger Pluem
b5bd03bd4e
* Correctly save the reverse proxy worker in all virtual host proxy configs.
...
PR: 52935
Obtained from: Petter Berntsen <petterb gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1302444 13f79535-47bb-0310-9956-ffa450edef68
2012-03-19 13:53:28 +00:00
Jim Jagielski
732f60dc2c
Handle cases, esp when using mod_proxy_fcgi, when we do not
...
want SCRIPT_FILENAME to include the query string.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242351 13f79535-47bb-0310-9956-ffa450edef68
2012-02-09 15:07:22 +00:00
Jeff Trawick
6635e5a3da
Adjust CVE-2011-3368/CVE-2011-4317 fixes to rely solely on
...
core's translate-name to fail unsupported URIs.
Rewrite and proxy now decline what they don't support rather
than fail the request.
Suggested by: trawick
Implemented by: jorton
Tweaked by: wrowe
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1233604 13f79535-47bb-0310-9956-ffa450edef68
2012-01-19 22:23:15 +00:00
Eric Covener
2293ff191f
restore the generic proxy workers to not being address-reusable.
...
The guts of mod_proxy is not really ready for the addr and host on a
proxy_conn_rec to change over time and differ from the 1 cached in the worker.
* proxy_worker->cp->addr needs to know what host/port it cached
* conn->addr and conn->hostname need to be allocated from their own subpool
so they can be cleared as they change
* ap_proxy_determine_connection needs to be more careful about which
addr is the TCP endpoint and what we have in either cache.
* may need to avoid updating the proxy_worker addr cache if we know
the value is flipping.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1227637 13f79535-47bb-0310-9956-ffa450edef68
2012-01-05 15:41:47 +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
Joe Orton
14fef5ae85
Fix for additional cases of URL rewriting with ProxyPassMatch or
...
RewriteRule, where particular request-URIs could result in undesired
backend network exposure in some configurations. (CVE-2011-4317)
Thanks to Prutha Parikh from Qualys for reporting this issue.
* modules/proxy/mod_proxy.c (proxy_trans): Decline to handle the "*"
request-URI. Fail for cases where r->uri does not begin with a "/".
* modules/mappers/mod_rewrite.c (hook_uri2file): Likewise.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209432 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 12:04:20 +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
cde53e72f0
whitespace
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1208067 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 21:14:03 +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
71f487a7b9
Expose the path that the balancer handles...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207582 13f79535-47bb-0310-9956-ffa450edef68
2011-11-28 20:46:53 +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
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
75c8dfdfdb
More error checking for ap_pregsub
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1198988 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 22:58:52 +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
69be927748
Force base 10 when parsing the Content-Length. It doesn't matter in this
...
case, but in general using strto*(..., 0) for parsing HTTP headers is a bug.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180689 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 19:00:51 +00:00
Jim Jagielski
427c85bd23
Cleanup effort in prep for GA push:
...
Trim trailing whitespace... no func change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
9bd21d2c8a
Forbid some directives in .htaccess because of AllowOverrideList:
...
core: AllowOverride, AllowOverrideList
mod_authn_dbd: AuthDBDUserPWQuery, AuthDBDUserRealmQuery
mod_authz_dbd: AuthzDBDQuery, AuthzDBDRedirectQuery
mod_proxy: BalancerMember, ProxySet
Adjust for use in .htaccess:
mod_actions: Script
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1153687 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 22:10:27 +00:00
Stefan Fritsch
59c52538f3
Code cleanup: replace apr_table_set with non-copying apr_table_setn
...
in a few places
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137413 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 18:50:12 +00:00
Stefan Fritsch
48345b21d0
Avoid some memory allocations by using apr_table_setn where the string arguments
...
are allocated from the request pool and not modified later on.
Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51358
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135084 13f79535-47bb-0310-9956-ffa450edef68
2011-06-13 11:04:29 +00:00
Stefan Fritsch
c9fd2623da
Introduce ap_(get|set)_core_module_config() functions/macros and use them
...
everywhere.
We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +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
Jeff Trawick
4598f1a7d4
fix some grammar mistakes, mostly in comments
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080821 13f79535-47bb-0310-9956-ffa450edef68
2011-03-12 00:35:39 +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
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
b32f5a5a09
Oops.... we need to adjust sticky, which is an array now
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067205 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 16:11:12 +00:00
Jim Jagielski
57a654ffe7
Instead of just enabling/disabling, we can now adjust
...
more useful worker status bits, such as whether hot stby, etc...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066482 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 14:39:48 +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
3866ae89a4
We can now change lbmethod at runtime.
...
Provide a stub for other balancer-related params to
be adjusted as well, like timeout, sticky, etc...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066076 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 16:00:01 +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
Rainer Jung
5e981d902a
mod_slotmem_shm is a predecessor of
...
mod_proxy_balancer, not mod_proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060109 13f79535-47bb-0310-9956-ffa450edef68
2011-01-17 22:09:18 +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