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

365 Commits

Author SHA1 Message Date
Joe Orton
a0570c8746 Move the POSIX reg* implementations into the ap_* namespace;
internalise the ap_reg*<->PCRE wrapper:

* configure.in: Add srclib/pcre to the include path.

* include/ap_regex.h: Renamed from include/pcreposix.h.  Prefix all
constants with AP_; prefix all functions and types with ap_.  Define
AP_DECLARE to nothing if necessary.  Remove regcomp error codes.

* include/httpd.h: Include ap_regex.h not pcreposix.h.
(ap_pregcomp, ap_regexec, ap_regfree): s/regex_t/ap_regex_t/.
(ap_regexec, ap_regerror): Prototypes moved to ap_regex.h.

* server/util.c (regex_cleanup, ap_pregcomp, ap_pregsub, ap_pregfree):
Adjust for ap_ prefixed types.  (ap_regexec, ap_regerror): Removed.

* server/Makefile.in: Build util_pcre.c.

* server/util_pcre.c: Copied from srclib/pcre/pcreposix.c; remove use
of PCRE-internals to do error mapping; rename types to add AP_/ap_
prefixes as above.  Use APR includes.  (ap_regerror): Use apr_snprintf.

* srclib/pcre/Makefile.in: Don't build pcreposix.c into libpcre.la.

* modules/*: Update to use new type and constant names.

PR: 27750 (part one)
Submitted by: Andres Salomon <dilinger voxel.net>, Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153384 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 12:00:41 +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
Justin Erenkrantz
632ec345e9 mod_proxy: Fix ProxyRemoteMatch directive.
PR: 33170
Submitted by: Rici Lake <rici ricilake.net>
Reviewed by:  Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151248 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 23:18:48 +00:00
Sander Striker
4162b98a0f Clean up some crumbs... The sandwich is next.
* modules\proxy\mod_proxy.c

  (alias_match): Removed unused variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151241 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 22:05:06 +00:00
Jim Jagielski
745572221a Remove old FIX_15207 snippets
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151212 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 19:25:38 +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
Mladen Turk
e6664a0bb2 Fix #32367 support for ProxyPass /foo !
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149420 13f79535-47bb-0310-9956-ffa450edef68
2005-02-01 17:17:40 +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
William A. Rowe Jr
d962fcfc8b FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!
Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
2005-01-02 05:33:44 +00:00
Jim Jagielski
79419db65a simplify the BalancerMember load factor weighting. Instead of
being percentages (and adjusting when the number don't add
up), loadfactors/lbfactors are now normalized values, so
values like:

   worker    a   b   c
   lbfactor  1   1   2

work as expected (ie: a gets 25%, b gets 25% and c gets 50%).
So we could also have the above as:

   worker    a   b   c
   lbfactor 25  25  50

or even

   worker    a   b   c
   lbfactor 15  15  30



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@122551 13f79535-47bb-0310-9956-ffa450edef68
2004-12-16 14:09:30 +00:00
Cliff Woolley
a89bce3fd9 "transfered" is not a word.
s/transfered/transferred/g;



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111858 13f79535-47bb-0310-9956-ffa450edef68
2004-12-14 18:58:25 +00:00
Jim Jagielski
0fb2f37f3e grammatical parameter change... "readed" -> "read"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111830 13f79535-47bb-0310-9956-ffa450edef68
2004-12-14 16:08:55 +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
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
f648ac6494 Merge the proxy_status too. Thanks to Christian von Rouques for the patch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105457 13f79535-47bb-0310-9956-ffa450edef68
2004-10-14 16:00:41 +00:00
Mladen Turk
084ca3d9eb Use apr_strftime instead our own format_byte_out function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105346 13f79535-47bb-0310-9956-ffa450edef68
2004-09-29 19:07:47 +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
349fbd8eb1 Initialize workers for every virtual server not just for default one.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105298 13f79535-47bb-0310-9956-ffa450edef68
2004-09-26 18:17:38 +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
c2f0914c75 Display worker status under server-status
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105172 13f79535-47bb-0310-9956-ffa450edef68
2004-09-16 14:02:16 +00:00
Mladen Turk
6799ab5774 Add maximum nuber of attempts for failover and run scheme handler
if worker is in error state up to that number.
Another great idea from Christian von Roques.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105171 13f79535-47bb-0310-9956-ffa450edef68
2004-09-16 12:08:00 +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
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
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
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
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
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
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
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
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
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
Jean-Frederic Clere
ba8ab9bed4 Prevent / beeing accepted wrongly by the proxy when having for example:
<Location /examples/>
   ProxyPass ajp://localhost:8009/examples/
</Location>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104714 13f79535-47bb-0310-9956-ffa450edef68
2004-08-18 16:46:12 +00:00
Jeff Trawick
26f21a9cbf fix format string mismatch (int vs. apr_time_t)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104643 13f79535-47bb-0310-9956-ffa450edef68
2004-08-13 12:09:13 +00:00
William A. Rowe Jr
84fd685bce Small status displaying fix.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104629 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:31:40 +00:00
William A. Rowe Jr
c42bcbc7ba Added proxy status for conf, and elected member to runtime worker
Added mod_status extension for displaying runtime
status informations for load balancer.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104627 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:30:17 +00:00
William A. Rowe Jr
c84854f270 Make sure that if the pre_request was called that the post_request
gets called too, no mather what the error code is.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104620 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:07:16 +00:00
William A. Rowe Jr
08e97ab50f Use the pool for add_worker call.
Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104616 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:01:39 +00:00
William A. Rowe Jr
8ca5c23d99 Add pool to functions for setting worker and balancer parameters.
Still have no idea why that doesn't work without duping as JeanFrederic reported.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104615 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 23:00:07 +00:00
William A. Rowe Jr
7d605dabeb Fix some config checking params.
Added route and route redirect to the runtime worker.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104606 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:48:13 +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
5faf9c3c49 Added KeepAlive worker option.
The scheme handler will override this setting if required, depending on the
protocol itself and keepalive_set flag.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104596 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:35:19 +00:00
William A. Rowe Jr
6c7efc889b Added iobuffersize and receivebuffersize to be worker specific.
As for timeout their default value is from proxy_conf.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104594 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:33:07 +00:00
William A. Rowe Jr
a603a36021 Added timeout_set for worker. Each worker can have a different timeout
the ProxyTimout sets. Also changed proxy_conf's timeout_set to int.

Use timeout_set for worker inherited from ProxyTimeout but overridable
using timout=xxx

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104592 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:31:46 +00:00
William A. Rowe Jr
c25b89a720 Added acquire timeout for obtaining resources from reslist.
The timeout is in milliseconds to enable quick return in case the
reslist is exceded the maximum number of connections.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104591 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:30:06 +00:00
William A. Rowe Jr
66239a82ef Remove proxy_mdule_conf.
We will change the scheme hook api to include the worker.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104590 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:28:59 +00:00
William A. Rowe Jr
3cc146e42b Remove proxy_conn struct and add it's params to proxy_conn_rec.
Use named structure type declarations.

Submitted by: mturk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104589 13f79535-47bb-0310-9956-ffa450edef68
2004-08-11 22:27:34 +00:00
William A. Rowe Jr
fd82a02ec8 Add worker timeout inherited from ProxyTimeout.
Submitted by: mturk


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