1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-14 01:22:37 +03:00
Commit Graph

476 Commits

Author SHA1 Message Date
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
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