1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-03 10:42:03 +03:00

178 Commits

Author SHA1 Message Date
Jean-Frederic Clere
4dee811cb9 Add sticky_path to solve PR41897.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@550519 13f79535-47bb-0310-9956-ffa450edef68
2007-06-25 14:42:25 +00:00
Jim Jagielski
5fdd230cc1 Add regex pattern matching to ProxyPass, allowing,
for example:

   ProxyPass ~ \.gif balancer://imagecluster




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@537429 13f79535-47bb-0310-9956-ffa450edef68
2007-05-12 14:12:24 +00:00
Jeff Trawick
92067e547e spellcheck
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@452405 13f79535-47bb-0310-9956-ffa450edef68
2006-10-03 10:52:12 +00:00
Mladen Turk
1689a2c3f4 Move new struct member to the end of the struct,
so we can keep the compatibility.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451582 13f79535-47bb-0310-9956-ffa450edef68
2006-09-30 11:26:26 +00:00
Mladen Turk
6a68c112dc Enable retry=0 for the worker.
This allows to have an option to always retry
the workers in error state instead using a
specified time.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451575 13f79535-47bb-0310-9956-ffa450edef68
2006-09-30 10:41:51 +00:00
Mladen Turk
9bbf36995e Cleanup: Remove close_on_recycle from proxy_conn_rec.
It behaves the same as close.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427959 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 12:03:42 +00:00
Jim Jagielski
61a56451a3 Add in a very simple balancer "set" concept, which allows
for members to be assigned to a particular cluster set
such that members in lower-numbered sets are checked/used
before those in higher ones.

Also bundled in this are some HTML cleanups for the balancer
manager UI. Sorry for the mixins :)

Compiles/builds clean: passes test framework as well
as more normal usage tests ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427172 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 17:01:40 +00:00
Mladen Turk
0658003dba Cleanup: Remove checking for pre 2.0.46 MMN. It is
obvious that the new mod_proxy will never be
backported to the 2.0 branch.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427055 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 09:33:28 +00:00
Mladen Turk
4fd2c57da0 Added cping/cpong support for the AJP protocol.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425454 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 16:50:07 +00:00
Nick Kew
346c6c3e76 Support environment variable interpolation in reverse proxy configuration
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421686 13f79535-47bb-0310-9956-ffa450edef68
2006-07-13 19:00:26 +00:00
Jim Jagielski
3e2c97f512 It never fails. I sit on a patch for awhile and
it's not until almost right after I commit it that
I think "hey, there's a better way to do that."
Anyway, I was never happy about the code
duplication of the primary/standby checks...
This fixes that.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421283 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 15:01:15 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Jim Jagielski
7b9391e010 Clean up some proxy macros. Avoid the use of magic
numbers, and instead use pre-defined defines. Also,
ensure that usable workers have been initialized :)

Allocate a bit for hot standbys. Adjust so that
normal "usable" workers don't count these.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420954 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 19:32:36 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Ruediger Pluem
96c6356987 * Avoid calling ap_proxy_http_cleanup twice as this releases a connection
from the connection pool twice. This causes this connection to be present
  in the connection pool twice. Thus it may be used by different threads
  at the same time which causes many troubles (segfaults in this case).
  Furthermore implement a logic to prevent double releases to the connection
  pool if they are triggered by buggy code and log an error message in this
  case.

  - mod_proxy_http.c: remove double calls to ap_proxy_http_cleanup
  - proxy_util.c: Add logic to prevent double releases of a
    connection to the connection pool.

PR: 38793


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394088 13f79535-47bb-0310-9956-ffa450edef68
2006-04-14 13:20:28 +00:00
Jim Jagielski
dede56b14d Document the removal of the flushing bandaid to a
runtime param. Since other protocols might benefit
from this, remove the ajp_ prefixes, to make it
more generic looking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390210 13f79535-47bb-0310-9956-ffa450edef68
2006-03-30 18:32:53 +00:00
Jim Jagielski
391472a050 Make AJP flushing admin configurable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@384580 13f79535-47bb-0310-9956-ffa450edef68
2006-03-09 18:39:16 +00:00
Ruediger Pluem
30d205d8a9 * Correctly signal broken backend connections up the chain also for the ajp
backend (see also r357461). Furthermore move common code in mod_proxy_http.c
  and mod_proxy_ajp.c into a new function (ap_proxy_backend_broke) in
  proxy_util.c.

  modules/proxy/mod_proxy_ajp.c : Signal broken backend connection for ajp backend
  modules/proxy/proxy_util.c    : Add ap_proxy_backend_broke
  modules/proxy/mod_proxy_http.c: - Use ap_proxy_backend_broke
                                  - Return DONE also if backend broke
  modules/proxy/mod_proxy.h     : Add declaration of ap_proxy_backend_broke


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@365374 13f79535-47bb-0310-9956-ffa450edef68
2006-01-02 16:39:22 +00:00
Ruediger Pluem
06c6bde4c6 * revert r355823 and r355837
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@355853 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 01:28:13 +00:00
Ruediger Pluem
614df45f1e * Move handling of backends that broke after the headers have been sent
into the proxy handler of mod_proxy.

  This patch still sets r->connection->aborted to 1 which is currently
  vetoed by Roy. Moving it from the scheme handler to the proxy handler
  should ease the reimplementation of this, as the scheme handlers only
  needs to return PROXY_BACKEND_BROKEN to signal the above situation to
  the proxy handler.

  mod_proxy.h: Add define for PROXY_BACKEND_BROKEN
  mod_proxy.c: Handle PROXY_BACKEND_BROKEN in proxy handler
  mod_proxy_http.c: Sent back PROXY_BACKEND_BROKEN if backend broke
  after we sent the headers.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@355823 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 00:15:27 +00:00
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
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +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
Nick Kew
d153de58fe Fix ProxyPassReverse & family to work correctly in <Location>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@231355 13f79535-47bb-0310-9956-ffa450edef68
2005-08-10 23:36:39 +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
Ian Holsman
9ffe8c5d1a This patch adds a new hook (request_status) that gets ran in proxy_handler
just before the final return.  This gives modules an opportunity to do
something based on the proxy status.

A couple of examples where this is useful:

-You are using a caching module and would rather return stale content rather
than an error to the client if the origin is down.

-you proxy some subrequests (using SSI - mod_include) and do not want SSI
errors when the backend is down. If you would normally return
HTTP_BAD_GATEWAY, you may have a module that serves some other content.


new hook -- so mmn bump.. i made it a major one, hope thats ok 

Patch From Brian Akins <Brian.Akins turner.com>




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219372 13f79535-47bb-0310-9956-ffa450edef68
2005-07-17 05:12:10 +00:00
Mladen Turk
0eab042f6a Use two optional functions from mod_ssl so that we
can receive both is_ssl and ssl_var for ajp protocol.
This is combined work based on patch from Brad Boyer and
Joe Orton's suggestion to use ssl_var_lookup.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160690 13f79535-47bb-0310-9956-ffa450edef68
2005-04-09 16:16:54 +00:00
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
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
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
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
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
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
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
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
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