1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

672 Commits

Author SHA1 Message Date
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
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
Graham Leggett
bf820c3251 Fix some compiler warnings in proxy
PR:
Obtained from:
Submitted by:	Geoffrey Young <geoff@modperlcookbook.org>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104708 13f79535-47bb-0310-9956-ffa450edef68
2004-08-18 13:34:17 +00:00
Jeff Trawick
e882977b72 axe some unused variables and don't log an error code that
hasn't been initialized


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104646 13f79535-47bb-0310-9956-ffa450edef68
2004-08-13 12:20:53 +00:00
William A. Rowe Jr
bf25755997 Fix setting of hostname for backend.
The now reflects the real name withouth scheme:// prefix.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104628 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:30:54 +00:00
William A. Rowe Jr
9b549607fc Added dynamic worker limit. It ensures that the addng dynamic
workers to the balancers never excedes that limit.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104625 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:10:35 +00:00
William A. Rowe Jr
855a0c323b Add some extra debugging to ease the bug chasing :)
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104624 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:09:57 +00:00
William A. Rowe Jr
4d5f6895d1 Implement the worker retry functionality.
It uses either worker->retry option or default 60 second retry
that is on each revolution extended by another 60 seconds.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104619 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:05:59 +00:00
William A. Rowe Jr
906f2c3d2d Shared memory support. The shared memory is inside
apache scoreboard. If it ever gets back ported we could use it on 2.0

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104617 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:02:53 +00:00
William A. Rowe Jr
b8a176667f Add route and redirect to worker so they can be set trough configuration.
Add worker status flag definitions.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104611 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:56:51 +00:00
William A. Rowe Jr
4c69458867 Set initial lbstatus to calculated lbfactor.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104610 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:55:28 +00:00
William A. Rowe Jr
674cfed554 Fix the assertion bug for reslist caused by returning the
same connection back to the pool twice.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104602 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:44:38 +00:00
William A. Rowe Jr
f99f785c89 Change the scheme handler hook to include worker.
We will probably need the balancer too, but that can wait for now.
Other undocumented changes (shame,shame) in proxy_util.c

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104600 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:41:02 +00:00
William A. Rowe Jr
ae18ec32a1 Added close_on_recycle flags for creatin connections.
This flag enables to distinguish between connection types.
Also added a pool cleanup bound to connection pool that recycles
the connection when client disconnects from server.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104599 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:39:02 +00:00
William A. Rowe Jr
6cc26c2656 Added acquire and release connection functions.
The acquire pulls the connection from the pool.
The release returns the connection to the pool.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104598 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:37:08 +00:00
William A. Rowe Jr
62ccd6ca6a Added ap_proxy_connection_create function that makes
conn_rec for opened connection. It is used bt http(s) and ftp for
bounding the backend connection to client connection with the same id's.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104597 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:36:28 +00:00