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
Joe Orton
dd9b830d5d
* modules/proxy/ajp_msg.c (ajp_msg_dump): Cast apr_size_t to unsigned
...
long to avoid the warning with %lx for 32-bit size_t too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105104 13f79535-47bb-0310-9956-ffa450edef68
2004-09-13 10:39:37 +00:00
Mladen Turk
3e6833da34
Add more comments to the code -- No functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105077 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 17:14:49 +00:00
Mladen Turk
99af1492a3
Add more comments to the code -- No functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105075 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 16:39:38 +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
Joe Orton
e75696f56e
Fix format string warnings in proxy_ajp on 64-bit platforms:
...
* modules/proxy/ajp_header.c (ajp_send_data_msg): Use
APR_SIZE_T_FMT.
* modules/proxy/ajp_link.c (ajp_ilink_receive): Don't pass
\n to ap_log_error; do use APR_SIZE_T_FMT.
* modules/proxy/ajp_msg.c (ajp_msg_dump, ajp_msg_check_header,
ajp_msg_copy): Use APR_SIZE_T_FMT.
(ajp_log_overflow): New function.
(ajp_msg_{append,peek,get}_*): Use it.
* modules/proxy/proxy_ajp.c (ap_proxy_ajp_request): Use
APR_SIZE_T_FMT.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105071 13f79535-47bb-0310-9956-ffa450edef68
2004-09-11 09:57:12 +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
a64681b5cf
Initialize the forward proxy worker too.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105065 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 18:47:55 +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
4877098bc4
Initialize the balancer on child_init instead on first request to skip
...
the race condition.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105063 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 18:25:54 +00:00
Mladen Turk
e93d6400e3
Include unistd.h for getpid.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105061 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 14:49:38 +00:00
Mladen Turk
9e235eb876
Fix compile time warnings (logging pointer and unused var).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105060 13f79535-47bb-0310-9956-ffa450edef68
2004-09-10 14:48:20 +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
ced8a94089
Add function protos so that -Wmissing-declarations doesn't complain.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105055 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 19:56:30 +00:00
Mladen Turk
db9425f495
Fix typo.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105054 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 19:55:24 +00:00
Mladen Turk
e35d233809
If any of steps return status != OK close the connection
...
and call the proxy_http_cleanup.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105051 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 16:22:23 +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
Mladen Turk
4f7554d102
Use forward worker for all PROXYREQ_PROXY requests.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105045 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 10:26:29 +00:00
Mladen Turk
c355a4dc78
Add 'default' foward proxy worker to the proxy_server_conf.
...
Forward worker is constructed on ProxyRequests directive
with sceme and host equals '*', meaning all.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105044 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 10:24:27 +00:00
Mladen Turk
5593ebbfb2
Add 'default' foward proxy worker to the proxy_server_conf.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105043 13f79535-47bb-0310-9956-ffa450edef68
2004-09-09 10:22:19 +00:00
Jeff Trawick
8091053814
spell check
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104944 13f79535-47bb-0310-9956-ffa450edef68
2004-09-03 16:15:03 +00:00
Justin Erenkrantz
df0ae2afcd
Fix a trio of bugs in how mod_proxy relays requests:
...
- Fix type error in proxy-sendchunks case that caused an invalid T-E header.
- Fix data corruption (seen with mod_ssl/mod_proxy combination) due to not
properly setting aside the body_buckets.
- Pass along a C-L: 0 if we still have a C-L of 0 after filtering and the
original request to us had that as well.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104926 13f79535-47bb-0310-9956-ffa450edef68
2004-09-01 17:21:53 +00:00
André Malo
7fe1e763e8
remove unused variables and fix some compiler warnings about const
...
qualifiers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104838 13f79535-47bb-0310-9956-ffa450edef68
2004-08-26 21:10:01 +00:00
Mladen Turk
2a80ab7e07
Untabify the source.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104813 13f79535-47bb-0310-9956-ffa450edef68
2004-08-26 06:57:16 +00:00
Mladen Turk
2d7f11c803
Add dynamic management to load balancer:
...
<Location /manager>
SetHandler balancer-manager
</Location>
It enables changing load factors, session routes, redirection
routes, and disabling/enabling particular workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104812 13f79535-47bb-0310-9956-ffa450edef68
2004-08-26 06:53:39 +00:00
Mladen Turk
a224ba752c
Add pool used for allocating proxy_server_conf to that struct.
...
It will be used for dynamic configuration, to ensure that dynamic
params has the same lifetime as the config has.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104811 13f79535-47bb-0310-9956-ffa450edef68
2004-08-26 06:49:22 +00:00
Mladen Turk
00005d8082
Document new API functions.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104798 13f79535-47bb-0310-9956-ffa450edef68
2004-08-25 11:22:54 +00:00
Mladen Turk
c5eb96b6cb
Remove the tabs from code.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104797 13f79535-47bb-0310-9956-ffa450edef68
2004-08-25 11:21:15 +00:00
Mladen Turk
4adc3e69d9
Added SSL custom indicators. They can be set using SetEnv directive,
...
so we don't need an extra one like the JkEnvVar is in the mod_jk.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104796 13f79535-47bb-0310-9956-ffa450edef68
2004-08-25 09:56:43 +00:00
Mladen Turk
40bc85dc55
Untabify the code. Have no idea who put all those tabs in sources.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104795 13f79535-47bb-0310-9956-ffa450edef68
2004-08-25 09:19:43 +00:00
Mladen Turk
c6e48bbe65
Added ProxySet directive (can be rename to something else).
...
The purpose is to be able to set the worker/balancer params
withouth the need for very long config lines :
<Proxy balancer://cluster>
ProxySet stickysession=JSESSIONID
</Proxy>
Or...
ProxySet balancer://cluser nofaiover=On timeout=2
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104794 13f79535-47bb-0310-9956-ffa450edef68
2004-08-25 09:13:09 +00:00
Mladen Turk
89bbf038a4
Remove BalancerStickySession directive.
...
This directive was leftover from the initial implementation.
The stickysession is set using 'name=val' like any other option.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104793 13f79535-47bb-0310-9956-ffa450edef68
2004-08-25 08:00:27 +00:00
Mladen Turk
38974860db
Remove uneeded access_status variable.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104792 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 13:50:43 +00:00
Mladen Turk
b9bee51adf
Do not check the balancer param.
...
It is already checked prior the hook is called from mod_proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104791 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 13:48:13 +00:00
Mladen Turk
58e35c8a4b
Increase the request count for each runtime worker
...
when the worker is elected.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104789 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 12:10:37 +00:00
Mladen Turk
41b64427f7
Implement REQ_ATTRIBUTE using request rec environment table,
...
so we can use standard SetEnv directive for that.
The ajp specific attributes has to be prefixed using 'AJP_', and are passed
withouth that prefix to the backend.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104788 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 11:55:23 +00:00
Mladen Turk
3b81c4cc5e
Use the session route from request rec notes.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104787 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 11:28:10 +00:00
Mladen Turk
e238532201
Add session route to request rec notes if present.
...
The session route is used only in proxy_ajp for now and
passed inside AJP header message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104786 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 11:27:31 +00:00
Justin Erenkrantz
a32e605179
Clean up some bogus error messages.
...
(I'll note that the code style in this file borders on unreadable.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104784 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 08:55:45 +00:00
Mladen Turk
8f2b824bc8
Use ap_str_tolower for lowercasing the scheme.
...
That was the original intention (not apr_tolower).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104783 13f79535-47bb-0310-9956-ffa450edef68
2004-08-24 08:24:18 +00:00