Jim Jagielski
aac783bdf5
No longer depend on how fork() works when laying out segments...
...
function pointers in shm are... nasty ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1072098 13f79535-47bb-0310-9956-ffa450edef68
2011-02-18 18:40:25 +00:00
Jim Jagielski
1d0800cd28
move function...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1069381 13f79535-47bb-0310-9956-ffa450edef68
2011-02-10 13:29:53 +00:00
Jim Jagielski
f67eea94fb
Ugg... unbalanced workers *do* need a mutex as well (good catch Rüdiger!)
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068879 13f79535-47bb-0310-9956-ffa450edef68
2011-02-09 13:20:09 +00:00
Jim Jagielski
84a5c9cd6f
Remove the thread mutex from the worker... it really should be
...
in the balancer. Thus we have global and thread for the balancer.
Use global when updating the full, shm list of workers; use
thread when being local.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068581 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 21:08:10 +00:00
Jim Jagielski
55b9f8fba8
Here we go... we can now, via balancer-manager, add new
...
workers to existing balancers. Still work to be done,
like error checking that we aren't trying to add more
than we can (right now, it fails, but it would be nice
to handle it nicer), disabling and *deleting* workers
we don't want anymore, the actual drain method, etc...
but this is some major goodness.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1067269 13f79535-47bb-0310-9956-ffa450edef68
2011-02-04 20:01:04 +00:00
Jim Jagielski
42f76d8265
No need to pollute the whole namespace...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066631 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 21:25:34 +00:00
Jim Jagielski
ee5eda1b71
Optimize... create a struct to hold the worker status info
...
(need to align w/ set_params later on) and note when we
update timestamps
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066607 13f79535-47bb-0310-9956-ffa450edef68
2011-02-02 20:17:22 +00:00
Jim Jagielski
f2c6805bc9
Again, abstract out the worker status magic to it's handled
...
by funcs...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066138 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 19:07:02 +00:00
Jim Jagielski
6c0a4fc5da
Move the setting of flags into a func... that way there is
...
one place to maintain as the number of flags grow...
Since we are using just the bits, make unsigned.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1066110 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 18:13:15 +00:00
Jim Jagielski
177e4e5f86
Move the lbmethod to also allow it to be adjusted runtime
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065750 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:29:01 +00:00
Jim Jagielski
12ae415dbe
Move some "nice to be able to change" balancer stuff to shm
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1065748 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 20:28:52 +00:00
Jim Jagielski
31c4a9e21e
Move nonce to balancer struct and add logic for nonce and growth.
...
Adjust mmn and update doccos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058629 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:22 +00:00
Jim Jagielski
68704e1435
Set some defaults... do it here @ worker creation, not initialization
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058627 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:13 +00:00
Jim Jagielski
ddebc67a4e
whitespace
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058626 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:10 +00:00
Jim Jagielski
fab3678ad3
Builds and passes tests as prefork... good save state
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058625 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:05 +00:00
Jim Jagielski
9096c04779
Adjust for conf->workers being *proxy_worker and balancer->workers being **proxy_worker
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058624 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:59:02 +00:00
Jim Jagielski
201bbd1ba9
More movement to shared stuff...
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058623 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:57 +00:00
Jim Jagielski
daa5a5c57c
OK... a good commit point (we don't quite compile yet though...)
...
Pull out the worker scoreboard cruft and start moving most
worker stuff to shm. Use slotmem for workers and provide
space for growth.
Redo logic:
ap_proxy_define_*
ap_proxy_create_*
ap_proxy_initialize_*
Right now just for workers, but lay framework for balancers
as well. The idea is to break out the functional parts
to make it easy for dynamics. Defining is simply describing
the worker, and tucking that info away. When we create, we
go ahead and create the shared memory, etc... Initialize
is simply to allow child process to access the shm...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058622 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:50 +00:00
Jim Jagielski
5febbb22aa
Use branch now
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058621 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:45 +00:00
Ruediger Pluem
b628c7f630
* Be ANSI C compatible
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055771 13f79535-47bb-0310-9956-ffa450edef68
2011-01-06 07:24:22 +00:00
Graham Leggett
e0cf3c996e
mod_proxy_http: Allocate the fake backend request from a child pool
...
of the backend connection, instead of misusing the pool of the frontend
request. Fixes a thread safety issue where buckets set aside in the
backend connection leak into other threads, and then disappear when
the frontend request is cleaned up, in turn causing corrupted buckets
to make other threads spin.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1055250 13f79535-47bb-0310-9956-ffa450edef68
2011-01-05 00:23:43 +00:00
Graham Leggett
4a8f0cdfbc
Fix a spin should we encounter a corrupt bucket from the proxy.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1053966 13f79535-47bb-0310-9956-ffa450edef68
2010-12-30 18:28:26 +00:00
Ruediger Pluem
cbe247d915
* The concept of the cleaned flag is flawed: Once we returned the connection
...
to the pool we cannot longer rely on it as another thread could have leased
the connection in the meantime and might have modified it.
BUT: We only use this flag once we returned the connection to the pool.
So signal that we returned the connection to the pool by something that is
local to the thread, in this case set backend to NULL if we already have
returende the connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1052314 13f79535-47bb-0310-9956-ffa450edef68
2010-12-23 16:43:43 +00:00
Stefan Fritsch
91cfd21ba9
Fix 'comparison is always false due to limited range of data type'.
...
One-bit flags should really be unsigned
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1036605 13f79535-47bb-0310-9956-ffa450edef68
2010-11-18 20:20:12 +00:00
Graham Leggett
807be6db70
Revert r1035504, this was the wrong way to do it.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035576 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 10:27:26 +00:00
Graham Leggett
38437740bb
Fix pool lifetime issues when the proxy backend connection is terminated
...
early by forcing a setaside on transient buckets placed in the brigade
by mod_ssl. This has the effect of extending the lifetime of buckets until
the end of the request. This is a variation on the original fix for this
problem, which added transient buckets to be setaside later in the process.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1035504 13f79535-47bb-0310-9956-ffa450edef68
2010-11-16 00:23:37 +00:00
Nick Kew
3bad5b1780
Fix mod_proxy to support setting source address.
...
PR 29404
Seems lots of users want this, and a couple of them have recenly asked nicely
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1034916 13f79535-47bb-0310-9956-ffa450edef68
2010-11-14 00:01:43 +00:00
Jeff Trawick
f0fb1e6653
log how long worker will be disabled
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032290 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 14:49:58 +00:00
Rainer Jung
2d9338d1dd
Followup to r1026665: reset "cleaned" flag in
...
ap_proxy_acquire_connection().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1030850 13f79535-47bb-0310-9956-ffa450edef68
2010-11-04 08:09:57 +00:00
Daniel Earl Poirier
6b803976f2
Fix a number of typos and misspellings. Reported by Ville Skytta.
...
PR48496.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1029134 13f79535-47bb-0310-9956-ffa450edef68
2010-10-30 17:56:13 +00:00
Graham Leggett
9d58cd6990
mod_proxy: Release the backend connection as soon as EOS is detected,
...
so the backend isn't forced to wait for the client to eventually
acknowledge the data.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1026665 13f79535-47bb-0310-9956-ffa450edef68
2010-10-23 19:26:44 +00:00
Graham Leggett
a68e17cdb2
Optimise the set flags in the mod_proxy structures.
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1025699 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20 19:47:00 +00:00
Jim Jagielski
1d50e028df
Fold in possible use of FNV if desired
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998949 13f79535-47bb-0310-9956-ffa450edef68
2010-09-20 14:51:19 +00:00
Jeff Trawick
eed7564b03
ap_proxy_retry_worker() only needs to spit out one debug
...
message, and it should indicate whether or not retry will
be attempted
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988635 13f79535-47bb-0310-9956-ffa450edef68
2010-08-24 18:04:06 +00:00
Jean-Frederic Clere
e8cf7c21e5
Prevent race condition
...
See http://www.mail-archive.com/dev@httpd.apache.org/msg47171.html
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@988038 13f79535-47bb-0310-9956-ffa450edef68
2010-08-23 09:09:25 +00:00
Ruediger Pluem
633efb3314
* The forward and reverse worker do not keep connections alive, so
...
ensure that mod_proxy_http does the correct thing
regarding the Connection header in the request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@985112 13f79535-47bb-0310-9956-ffa450edef68
2010-08-13 07:24:36 +00:00
Jim Jagielski
c55a15fc2f
Fold in some stuff to allow for matching of workers
...
to their actual scoreboard slots, independent of slot
ID.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@984188 13f79535-47bb-0310-9956-ffa450edef68
2010-08-10 19:46:58 +00:00
Stefan Fritsch
aa576071af
- Remove a load of unused variables (or variables that are set but never read).
...
- Move some declarations into the correct #ifdef scope.
I couldn't compile/test netware, but the changes look obvious enough.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982016 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 19:45:21 +00:00
Jim Jagielski
ed67c11e05
Allow for modules to keep track of worker slot
...
numbers themselves if they want, by allowing for
worker create/alloc functions to take a slot number id.
Done via _wid() variants of 3 proxy funcs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@964089 13f79535-47bb-0310-9956-ffa450edef68
2010-07-14 16:03:19 +00:00
Stefan Fritsch
01b9f2e551
- Be less verbose at levels INFO and DEBUG in mod_proxy* and mod_ssl
...
- Add some trace logging to core and http
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951900 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:07:12 +00:00
Stefan Fritsch
ebb62867fb
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
...
advantage of per-module loglevels
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Stefan Fritsch
877b46df6b
log issues with CONNECT at request scope instead of server scope
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951189 13f79535-47bb-0310-9956-ffa450edef68
2010-06-03 22:47:46 +00:00
Rainer Jung
d0046ecbc4
Handle the pathological case of a connect
...
backend that sends us an unexpectedly huge response.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910124 13f79535-47bb-0310-9956-ffa450edef68
2010-02-14 23:45:59 +00:00
Rainer Jung
92590ca5cd
We need to copy the forward proxy data, because it
...
might be reused during later requests using the same
backend connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910081 13f79535-47bb-0310-9956-ffa450edef68
2010-02-14 21:37:36 +00:00
Rainer Jung
8e6c0bdc8a
Limit sscanf format to the number of chars actually
...
needed and buffer size provided to prevent buffer overflow.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910079 13f79535-47bb-0310-9956-ffa450edef68
2010-02-14 21:36:03 +00:00
Rainer Jung
8eb4de81e9
Support remote https proxies by using HTTP CONNECT.
...
PR: 19188
Submitted by: Philippe Dutrueux <lilas evidian.com>
Reviewed by: rjung
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@909323 13f79535-47bb-0310-9956-ffa450edef68
2010-02-12 09:58:48 +00:00
Jeff Trawick
a949ec256b
fix maintainer mode ap_strstr() argument mismatch warnings
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@902245 13f79535-47bb-0310-9956-ffa450edef68
2010-01-22 20:03:25 +00:00
Nick Kew
103b68d409
Fix r893871 as noted by rpluem, to remove risk of returning a
...
relative-ised URL, and fix erroneous CHANGES bug attribution.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@893955 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 10:30:52 +00:00
Nick Kew
71b01f9b82
Proxy: fix ProxyPassReverse with relative URL
...
PR 38864
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@893871 13f79535-47bb-0310-9956-ffa450edef68
2009-12-25 15:26:49 +00:00
Jean-Frederic Clere
a94b2e9e90
Don't set worker->s if already set (for balancer using slotmem for examples).
...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@788718 13f79535-47bb-0310-9956-ffa450edef68
2009-06-26 14:26:19 +00:00