Commit Graph

114 Commits

Author SHA1 Message Date
ce75fb285c No functional change; simplify the CVE-2007-6420 fix slightly, as
suggested by rpluem:

* modules/proxy/mod_proxy_balancer.c (balancer_init): Serialize the
  UUID to a string here...
  (balancer_handler): ...rather than here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@663967 13f79535-47bb-0310-9956-ffa450edef68
2008-06-06 14:44:35 +00:00
4a375eff22 Prevent CSRF attacks against the balancer-manager (CVE-2007-6420)
* modules/proxy/mod_proxy_balancer.c (balancer_init): New function.
  (balancer_handler): Place a nonce in the form output, and check that
  the submitted form data includes that nonce.
  (ap_proxy_balancer_register_hook): Register the new post_config hook.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661666 13f79535-47bb-0310-9956-ffa450edef68
2008-05-30 11:49:31 +00:00
6e450bc660 * Set at init time and combine comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661459 13f79535-47bb-0310-9956-ffa450edef68
2008-05-29 20:12:58 +00:00
c3242b9c5c * Do not add the query string again in the case that we are using the
unparsed uri.

PR: 44803


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@661452 13f79535-47bb-0310-9956-ffa450edef68
2008-05-29 19:53:30 +00:00
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
6062378f7c * Correctly escape the worker route and the worker redirect string in the HTML
output of the balancer manager.

Reported by SecurityReason.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607275 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 15:57:36 +00:00
d80bc134c9 * Prevent crash in balancer manager if invalid balancer name is passed as
parameter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@607273 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 15:53:45 +00:00
b514669c7a * Set character set for HTML outputs generated by mod_ldap,
mod_proxy_balancer, mod_proxy_ftp, mod_info, mod_dav without a character
  set to ISO-8859-1.

Submitted by: jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606693 13f79535-47bb-0310-9956-ffa450edef68
2007-12-24 11:45:22 +00:00
4df56cc5aa * Remove unneeded include of unistd.h. getpid is not used any longer since
r394065.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@599326 13f79535-47bb-0310-9956-ffa450edef68
2007-11-29 08:18:31 +00:00
60bda3ec81 These really are block specific, so why not
make them as such :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@575712 13f79535-47bb-0310-9956-ffa450edef68
2007-09-14 14:57:56 +00:00
5579888fa5 * Do not reset lbstatus, lbfactor and lbset if the shared proxy_worker_stat
structure for a worker is already initialized by the same or another
  process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574485 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 06:38:16 +00:00
42bb0116dd as not everyone needs sticky sessions - avoid segfault in balancer manager and
mod_status


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@572832 13f79535-47bb-0310-9956-ffa450edef68
2007-09-04 23:09:24 +00:00
7306af0a70 Return 503 only if the route matches some of the balancer members and nofailover=On is specified.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@556931 13f79535-47bb-0310-9956-ffa450edef68
2007-07-17 14:31:05 +00:00
e7a75e4f3e Fill notes "session-sticky" and subprocess_env "BALANCER_SESSION_STICKY"
correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@554892 13f79535-47bb-0310-9956-ffa450edef68
2007-07-10 09:53:36 +00:00
3fe0224692 Don't display "PHPSESSIONID | PHPSESSIONID" but only
"PHPSESSIONID".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551126 13f79535-47bb-0310-9956-ffa450edef68
2007-06-27 11:39:03 +00:00
9e567f96de Remove the balancer modification logic of balancer-manager
because it can't work. And add the sticky_path to the
sticky display.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551099 13f79535-47bb-0310-9956-ffa450edef68
2007-06-27 08:42:02 +00:00
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
94743e8f7b * Preset the form fields for route and redirect with the values of the active
configuration in the scoreboard and not with the ones loaded from the
  configuration files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@544930 13f79535-47bb-0310-9956-ffa450edef68
2007-06-06 20:02:56 +00:00
bf5a6bc8e5 Fix compile warning:
mod_proxy_balancer.c:537: warning: unused variable 'rv'



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484794 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:38:40 +00:00
3b5d5bf319 Failure to unlock is very nasty, so log it to help
with troubleshooting.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484792 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:37:08 +00:00
ba2a767fe6 We are doing nothing here... but keep the stubs
in case we ever do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484789 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:29:20 +00:00
792dfe200b Log when the lock fails.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484787 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:26:40 +00:00
83a044b23a No need for each ind lb method to increment the elected
element. Do so from the main calling func.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484783 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 21:13:01 +00:00
f80b020c74 Add force recovery for balancer.
In case all balancer members were in error state 503
was returned until the recovery timeout expired.
The patch forces recovery in case all balancer members
are in error state regardless of recovery timeout
directive.
This fixes the time gap when 503 was returned and
backend was already up and running.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451572 13f79535-47bb-0310-9956-ffa450edef68
2006-09-30 10:18:48 +00:00
483ddc121a * Set the new environment variable BALANCER_ROUTE_CHANGED if a worker with a
route different from the one supplied by the client had been chosen or if
  the client supplied no routing information for a balancer with sticky
  sessions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@446929 13f79535-47bb-0310-9956-ffa450edef68
2006-09-16 19:49:41 +00:00
743a621e8d Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +00:00
3397848717 * Extract stickysession information correctly in the case that it is given
as parameter like in the following example:

  www.someplace.com/somewhere/?jsessionid=gggfgdufdfoef.server&parameter=value

  So far we were only able to handle stickysession information encoded in the
  following form:

  www.someplace.com/somewhere/;jsessionid=gggfgdufdfoef.server?parameter=value

PR: 40400


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440160 13f79535-47bb-0310-9956-ffa450edef68
2006-09-04 19:51:52 +00:00
3eeb5a123b Initialization change. Move to a different format
to force resets as well as a common technique, in case
_route is updated at some point.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428361 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 11:41:14 +00:00
585f146b66 Reset standby flags for each loop through the cluster sets
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428352 13f79535-47bb-0310-9956-ffa450edef68
2006-08-03 11:30:11 +00:00
dc9255aabe Good catch by Ruediger
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@427368 13f79535-47bb-0310-9956-ffa450edef68
2006-07-31 23:46:55 +00:00
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
ae24222e23 The number of times elected as well as the i/o
of the workers is useful info to show in the
manager.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421287 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 15:13:22 +00:00
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
0b80babf0b Add in hot-standby balancer member. If all other members
are disabled or not-usable, ONLY THEN will the hot
standby's be used.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420986 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:39:38 +00:00
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
92a185a104 Restructure the find_route_worker() function. Basically,
it should take care of knowing about usable and unusable
workers. By centralizing this logic, it will make it
easier and more streamlined to add in the forthcoming
hot-standby status workers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420936 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 17:51:54 +00:00
c99bff74f3 * Retry worker chosen by client supplied route / redirect worker if it
is in error state before sending "Service Temporarily Unavailable".

PR: 38962
Submitted by: Christian Boitel <cboitel lfdj.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417443 13f79535-47bb-0310-9956-ffa450edef68
2006-06-27 12:05:43 +00:00
58f86ac058 * Add the following environment variables to expose the information
* about
  the route, the sticky session and the worker used during a request to
  other modules:

  BALANCER_SESSION_STICKY
  BALANCER_SESSION_ROUTE
  BALANCER_NAME
  BALANCER_WORKER_NAME
  BALANCER_WORKER_ROUTE

PR: 39806
Submitted by: Brian <brectanu gmail.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417238 13f79535-47bb-0310-9956-ffa450edef68
2006-06-26 16:59:38 +00:00
ca55328af7 Merge the fcgi-proxy-dev branch to trunk, adding a FastCGI back end for
mod_proxy.  This log message is just a summary of the changes, for the
full original log messages see r357431:393955 in branches/fcgi-proxy-dev.

* modules/proxy/mod_proxy_fcgi.c: New file, holds the impementation of
  our new fcgi backend for mod_proxy.

* modules/proxy/fcgi_protocol.h: New file, holds constants and structures
  for the fcgi protocol.

* modules/proxy/mod_proxy_balancer.c
  (proxy_balancer_canon): Set up r->path_info, so the PATH_INFO env
   variable is correctly passed on to balancer workers.

* modules/proxy/config.m4: Build the new mod_proxy_fcgi module.

* support: Add fcgistarter to svn:ignore.

* support/Makefile.in: Build the new fcgistarter program.

* support/fcgistarter.c: New program, a helper for starting fcgi worker
  processes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@396063 13f79535-47bb-0310-9956-ffa450edef68
2006-04-22 03:44:05 +00:00
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
4f88d90ea6 * Also initialize local data structures for workers of a balancer.
PR: 38227, 39267
Submitted by: James A. Robinson <jim.robinson stanford.edu>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394446 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 09:12:24 +00:00
9704233d80 * After r377780 the condition in the if clause never becomes true, because
ap_proxy_initialize_worker_share is always left with PROXY_WORKER_INITIALIZED
  set in workers->s->status. So remove this code to save cycles and avoid
  confusion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@394065 13f79535-47bb-0310-9956-ffa450edef68
2006-04-14 11:30:04 +00:00
b2e9ae5b1d * modules/proxy/mod_proxy_balancer.c: Include unistd.h to pick up
getpid() prototype.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@375310 13f79535-47bb-0310-9956-ffa450edef68
2006-02-06 16:35:20 +00:00
f6b46944d4 * Do not overwrite the status of initialized workers and respect the configured
status of uninitilized workers when creating a new child process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@374929 13f79535-47bb-0310-9956-ffa450edef68
2006-02-04 21:25:48 +00:00
e708604555 * Fix PR37753. Off by one bug in get_path_param eats up too much of the string
such that session identifier for sticky sessions is never found in URL.

Submitted by: Kazuhiro Osawa <ko yappo.ne.jp>
Reviewed by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@352010 13f79535-47bb-0310-9956-ffa450edef68
2005-12-03 20:17:11 +00:00
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
be32e160ac mod_proxy_balancer: BalancerManager and proxies correctly handle
member workers with paths. PR36816. [Ruediger Pluem, Jim Jagielski]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@312963 13f79535-47bb-0310-9956-ffa450edef68
2005-10-11 21:40:32 +00:00
13bceeee23 * Fix a declaration problem introduced in r195013 that is C99 but not ANSI C
compatible. Thus move declaration of *worker to the top of find_session_route
  to make it ANSI C compatible again.

Submitted by: NormW <normw bocnet.com.au>
Reviewed by: Ruediger Pluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307389 13f79535-47bb-0310-9956-ffa450edef68
2005-10-09 10:59:06 +00:00
fc078f7336 * Fix PR36507 (mod_proxy_balancer does not handle sticky sessions with
tomcat correctly).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@295013 13f79535-47bb-0310-9956-ffa450edef68
2005-10-05 07:59:36 +00:00
8df46b6dd6 * modules/proxy/mod_proxy_balancer.c (balancer_handler): Fix gcc
warning; no functional change.

* modules/proxy/mod_proxy.c (set_balancer_param): Likewise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279973 13f79535-47bb-0310-9956-ffa450edef68
2005-09-10 09:10:27 +00:00