1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

672 Commits

Author SHA1 Message Date
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
Jim Jagielski
13bce6474d Return APR_EGENERAL for the error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774423 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13 16:46:59 +00:00
Jean-Frederic Clere
48ae3d9efa Allow the load balancing method to "create" workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774400 13f79535-47bb-0310-9956-ffa450edef68
2009-05-13 15:27:05 +00:00
Ruediger Pluem
124dd1c76f * Fix syntax error
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@772126 13f79535-47bb-0310-9956-ffa450edef68
2009-05-06 10:06:06 +00:00
Jim Jagielski
9399483e16 optimize.... rp! :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771976 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 19:29:04 +00:00
Jean-Frederic Clere
a29e9ec1d5 Change the order of mod_proxy and mod_proxy_balancer child_init().
Change the balancer workers area to the address of workers instead copying the workers.
Arrange lbmethod accordingly.
Move the creation of conf->forward worker to mod_proxy child_init().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771940 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 17:15:48 +00:00
Jim Jagielski
8fa2a05a1d Explain empty code block (empty for now, that is) :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771925 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 16:55:56 +00:00
Ruediger Pluem
9ba4889cc7 * Silence compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771610 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 07:43:14 +00:00
William A. Rowe Jr
ff342e630c As mentioned inline in comments, correctly handle more sophisticated
transformations which currently fail for balancer://foo targets, but
work just fine with other ProxyReverse targets.

  The balancer comparison is a bit trickier.  Given the context

    BalancerMember balancer://alias http://example.com/foo
    ProxyPassReverse /bash balancer://alias/bar

  translate url http://example.com/foo/bar/that to /bash/that

E.g. there may be several different url-suffixes (1st order) of any
particular BalancerMember set e.g. /app1, /app1 and /appbeta while
there may be additional suffixes associated with the actual
ProxyPassReverse directive.  Neither were properly reversed, now
both should be properly handled.

One *critical* assumption;

    BalancerMember balancer://alias/foo http://example.com/bar

should be documented as a meaningless construct, since one cannot
have two members, balancer://alias/foo and balancer://alias/bar,
and the balancer member structures discard this path.

Note one more existing error case as an XXX comment due to invalid
uri comparisons.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771587 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 06:44:02 +00:00
William A. Rowe Jr
6ca2633f75 REVERT 771581 modules/proxy/ changes (miscommitted)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771583 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 06:39:03 +00:00
William A. Rowe Jr
0fe6d791a5 complete r771579, refactoring mod_watchdog as loadable on win32
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@771581 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 06:26:24 +00:00
Jim Jagielski
7e145e7312 Fold in initial template for methods to be able to
reset (initialize) and "age" their data, useful when
adding new workers, or when workers come back into
the fold....

Logic and code to come in a bit :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@769020 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:02:40 +00:00
Jeff Trawick
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
Jeff Trawick
2f9b9fdd70 remove BeOS OS support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758891 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 22:23:44 +00:00
Jim Jagielski
77db8b2111 Note for self: PPR drops the path info so we
don't really honor PPR /foo balancer://bar/jimbob
in a way that we would expect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@752140 13f79535-47bb-0310-9956-ffa450edef68
2009-03-10 15:33:05 +00:00