Jim Jagielski
22c5cb4728
Proxy balancer lbmethods are now registered as providers and not
...
via hooks. Move various find() functions back to mod_proxy_balancer
where they belong :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279752 13f79535-47bb-0310-9956-ffa450edef68
2005-09-09 12:28:02 +00:00
Jim Jagielski
da3e833d30
Restruct of lbmethod find-best algo's, bypassing hook mechanism.
...
Looking into provider method, but until then... Prevent core dump
when balancer not in vhosts
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279305 13f79535-47bb-0310-9956-ffa450edef68
2005-09-07 12:04:15 +00:00
Martin Kraemer
4813d8a994
Get rid of some warnings
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232311 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 15:22:19 +00:00
Jim Jagielski
a7d488a6d2
simple, functional interface to add additional balancer lb selection methods
...
without requiring code changes to mod_proxy/mod_proxy_balancer;
these can be implemented via sub-modules now.
Let the games begin...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232282 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 12:47:04 +00:00
Nick Kew
ab0fd007b9
Fix mess left by incompleteness of previous ProxyPassReverse fix
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232247 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 09:38:09 +00:00
Mladen Turk
e7479bf114
Add status param option so that current worker
...
status can be changed via editing httpd.conf instead
just using web page. Seems the ApacheCon is paying of.
Thanks to Sander for pointing that out.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@225751 13f79535-47bb-0310-9956-ffa450edef68
2005-07-28 11:16:34 +00:00
Paul Querna
693107a967
- Use apr_uri_t to parse the proxy URL, instead of munging it by hand. Original code did not handle IPv6 Addresses correctly.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178391 13f79535-47bb-0310-9956-ffa450edef68
2005-05-25 06:42:33 +00:00
Mladen Turk
86efa87d70
Revert the latest hack for setting query string.
...
The balancer needs canon_handler.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160674 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 10:08:56 +00:00
Mladen Turk
94f13c9748
Add r->args to uri->query if the original r->uri
...
did not contain query string. This fixes #34266 .
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160663 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 07:32:42 +00:00
Jeff Trawick
9ff46dd755
Remove formatting characters from ap_log_error() calls. These
...
were escaped as fallout from CAN-2003-0020.
Submitted by: Eric Covener <ecovener gmail.com>
Reviewed by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153105 13f79535-47bb-0310-9956-ffa450edef68
2005-02-09 19:01:43 +00:00
Sander Striker
7b9a0e8388
* modules/proxy/proxy_util.c
...
(ap_proxy_pre_request): Log an error when all workers are busy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152964 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 23:57:50 +00:00
Justin Erenkrantz
905cdf9f0b
Update copyright year to 2005 and standardize on current copyright owner line.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Jim Jagielski
9935c31bdd
Close PR 32459, 15207. API change for PROXY_DECLARE ap_proxy_canonenc()
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151153 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 13:38:24 +00:00
Jim Jagielski
fe2650384d
Add in a weighted byte count of all traffic (in and out) as
...
an alternative balancing method. We do not "adjust" the
byte count wrt scheme or method, simply by factoring
in the lbfactor value.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@126304 13f79535-47bb-0310-9956-ffa450edef68
2005-01-24 18:28:16 +00:00
Sander Striker
46ba14216d
Rewrite Cookies and other headers in mod_proxy_ajp as configured with
...
ProxyPassReverse and ProxyPassReverseCookiePath.
* modules/proxy/proxy_ajp.c
(ap_proxy_ajp_request): Update call to ajp_parse_header().
* modules/proxy/ajp.h
(ajp_msg_get_string): constify argument.
(ajp_parse_header): Add conf argument.
* modules/proxy/proxy_util.c
(ap_proxy_location_reverse_map): Promoted from mod_proxy_http.
(ap_proxy_cookie_reverse_map): Promoted from mod_proxy_http;
renamed from proxy_cookie_reverse_map.
* modules/proxy/ajp_msg.c
(ajp_msg_get_string): constify argument.
* modules/proxy/proxy_http.c
(ap_proxy_location_reverse_map, proxy_cookie_reverse_map: Removed.
(process_proxy_header): Update header mapping table to reference the now
public functions.
* modules/proxy/ajp_header.c
(ajp_unmarshal_response): And conf argument. Reverse map cookies and
other headers.
(ajp_parse_header): Update call to ajp_unmarshal_response().
* modules/proxy/mod_proxy.h
(ap_proxy_location_reverse_map, ap_proxy_cookie_reverse_map): Declare
functions that have been promoted to be public.
(ap_proxy_header_reverse_map_fn): Typedef for the signature of the above
two functions (currently used in mod_proxy_http).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124901 13f79535-47bb-0310-9956-ffa450edef68
2005-01-11 08:35:46 +00:00
Mladen Turk
6ef95d4e37
Kill the pool cleanup when closing non cachable connection.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123884 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 08:00:26 +00:00
Mladen Turk
55230b229b
Fix closing connection for non-cachable proxies.
...
Do not close the entire connection, just socket if
opened.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123842 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 16:04:25 +00:00
Mladen Turk
def2248738
Close the connection for generic forward and
...
reverse proxy workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123840 13f79535-47bb-0310-9956-ffa450edef68
2005-01-01 15:23:51 +00:00
Mladen Turk
6d38243ac0
Simplify connection address and port resolving for non-cachable workers (gereric forward and reverse proxy).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123811 13f79535-47bb-0310-9956-ffa450edef68
2004-12-31 17:25:58 +00:00
Mladen Turk
81f6517752
Do not cache hostname and port for forward and
...
reverse generic proxy workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123809 13f79535-47bb-0310-9956-ffa450edef68
2004-12-31 17:01:05 +00:00
Mladen Turk
939710c063
Make proxy address cache thread safe and available only
...
to pooled workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111827 13f79535-47bb-0310-9956-ffa450edef68
2004-12-14 15:45:19 +00:00
Jeff Trawick
803d2b468d
mod_proxy: Respect errors reported by pre_connection hooks.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111304 13f79535-47bb-0310-9956-ffa450edef68
2004-12-08 20:19:04 +00:00
Jeff Trawick
7eb243ba75
wrong format string was converted to APR_PID_T_FMT
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109506 13f79535-47bb-0310-9956-ffa450edef68
2004-12-02 16:37:41 +00:00
Mladen Turk
4dda290fd1
Add generic reverse proxy worker so that module-driven reverse proxying works. It is enabled by default, but IMO it should be configurable like any other worker so we can limit the number of outgoing connections.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@109316 13f79535-47bb-0310-9956-ffa450edef68
2004-12-01 08:44:11 +00:00
Mladen Turk
08dfbe5e49
Use APR_PID_T_FMT instead %d for pid logging.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106903 13f79535-47bb-0310-9956-ffa450edef68
2004-11-29 10:54:46 +00:00
Mladen Turk
25e6a4a500
Make sure that worker initialization is done only
...
once per worker, as well the initialization of shared
memory slot. Also log the child pid so that logging
makes sense.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106902 13f79535-47bb-0310-9956-ffa450edef68
2004-11-29 10:43:28 +00:00
Mladen Turk
d19ff8597f
Do not use reslist if it wasn't created. This fixes cases on prefork with
...
threads enabled and hmax set.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105480 13f79535-47bb-0310-9956-ffa450edef68
2004-10-16 06:52:35 +00:00
Mladen Turk
1994180dc0
Add server_rec to initialize_worker_share so that it get's
...
correctly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105345 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 19:05:44 +00:00
Mladen Turk
0d9c89ae6f
Reformat code to no tab and no CR-LF
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105320 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 16:54:29 +00:00
Mladen Turk
258273c945
Make sure that we don't increase balancer worker count on
...
gracefull restart. Thanks to Christian...again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105318 13f79535-47bb-0310-9956-ffa450edef68
2004-09-28 16:35:29 +00:00
Mladen Turk
8a2d25e4fa
Remove proxy_runtime_worker and make the things simpler by
...
sharing runtime status accross child processes. Also make sure
that shared data is initialized after the scoreboard is created.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105293 13f79535-47bb-0310-9956-ffa450edef68
2004-09-26 06:54:27 +00:00
Mladen Turk
b4442f1f73
Make worker retry algorithm much simpler removing incremental
...
timeout increase.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105177 13f79535-47bb-0310-9956-ffa450edef68
2004-09-17 08:00:20 +00:00
Mladen Turk
ccd30cbfd2
Fix worker retries and limit default retry timeout to 10 minutes.
...
Thanks to Christian von Roques for spotting that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105136 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 12:20:19 +00:00
Mladen Turk
ff2207a250
Register output function so that core can retrieve it and set
...
scoreboard accordingly
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105132 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 11:57:02 +00:00
Mladen Turk
2a234c6ec6
Fix typo -- uri is constructed when there is no proxy in chain.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105110 13f79535-47bb-0310-9956-ffa450edef68
2004-09-13 11:36:24 +00:00
Mladen Turk
925dcf456d
No need to allocate hostname on each request for
...
persistent connections.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105109 13f79535-47bb-0310-9956-ffa450edef68
2004-09-13 11:30:22 +00:00
Mladen Turk
5cc48386c4
Always use prive connection pool for allocation, and call
...
apr_pool_clear when the connection is closed on recycle, so
that we don't leak on persistent connections.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105108 13f79535-47bb-0310-9956-ffa450edef68
2004-09-13 11:13:28 +00:00
Mladen Turk
5a5f85aad4
Use worker as a parameter for connection_constructor.
...
When min connections is greater then zero connstructor is
called when the reslist is created.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105073 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 10:50:05 +00:00
Mladen Turk
dd00fb7d89
Do not add forward proxy to other proxies. Use new function to
...
create the worker that isn't by default added to the list of other workers.
This enalbles mixing forward and reverse proxy functionality on the same box.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105070 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 09:31:10 +00:00
Mladen Turk
dca2aae9b3
Remove the unused close_connection function.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105069 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 09:12:26 +00:00
Mladen Turk
c1a9316651
Make sure that the connection pool cleanup is called before
...
the reslist is destroyed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105068 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 09:08:00 +00:00
Mladen Turk
225dd230c4
Just like for balancers initialize the workers on post_config
...
instead on first request to skip the race condition.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105064 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 18:29:16 +00:00
Mladen Turk
be924b521a
Remove the proxy_conn_cleanup. The socket will be closed
...
when the pool is cleared or destroyed by it's own cleanup routine.
Also skip clearing sockets if the workers pool is destroyed, cause
the pool might already be destroyed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105059 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 14:32:11 +00:00
Mladen Turk
916b02a98d
Move the shared scoreboard data initization to the balancer module.
...
The initialization is done like for the worker, on first request.
This is done because during config phase we don't have a scoreboard
to allocate from. Thanks to Chritian von Roques for spotting that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105057 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 08:16:25 +00:00
Mladen Turk
333cd66de6
Remove unneeded variable. No functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105056 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 19:57:29 +00:00
Mladen Turk
7e60923864
Make sure that the status is not overwritten.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105050 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 16:14:41 +00:00
Jeff Trawick
2f4e3c8872
spellcheck
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105049 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 15:54:50 +00:00
Mladen Turk
4f9be531d7
First try the reverse proxies. If there is no worker defined for
...
requested uri use the forward worker, but only for PROXYREQ_PROXY
requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105048 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 13:51:08 +00:00
Mladen Turk
44d1474f1e
Add PROXY_WORKER_IGNORE_ERRORS flags that
...
disables puting the entire worker in retry mode, cause
for forward workers the remote is not fixed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105047 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 13:15:40 +00:00
Mladen Turk
bea1cc4147
Add sockaddr to proxy_conn_rec. Using the workers address
...
is unsafe for forward proxy workers, cause unlike reverse
proxies the forward can have each connection with different
remote address.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105046 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 13:03:06 +00:00