1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

360 Commits

Author SHA1 Message Date
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
Ruediger Pluem
4a3c945b14 * Rip out the old flushing approach for solving lifetime issues between the
backend connection bucket allocator and front end connection bucket allocator.
  Instead copy the buckets from the backend over to ones that have been created
  using the front end bucket allocator. For metabucket this is done by recreating
  them, for data buckets this is done by reading them and putting the read data
  in a transient bucket.

PR: 45792


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@712375 13f79535-47bb-0310-9956-ffa450edef68
2008-11-08 11:09:38 +00:00
Ruediger Pluem
c1f881e048 * Improve the way to detect whether buckets in the filter chain need to be
flushed by using the main requests bytes_count field instead of the
  subrequest field.

* Do not reset conn->need_flush. This prevents SegFaults from not flushing
  buckets in the filter chain.

PR: 45792


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@706921 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 09:34:21 +00:00
Ruediger Pluem
53ddbf41b5 * Revert r703998.
The call to apr_socket_timeout_set before apr_socket_connect already sets the
  socket to non-blocking mode because the timeout of the socket is -1 after creation. A further
  call to apr_socket_timeout_set (after the connect call does not do this, because the old
  and the new timeout are >=0). The further code expects the socket to be in non-blocking
  mode, otherwise we have regressions with ssl. This can be notified by running t/ssl/proxy
  on 2.2.x which runs much much slower with the patch applied. This does not happen
  on trunk because the socket is set back to non blocking by the core output filter
  (async write completion).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@704753 13f79535-47bb-0310-9956-ffa450edef68
2008-10-15 00:53:39 +00:00
Ruediger Pluem
4809b77936 * Make the connection timeout to backends work by temporarily setting the
socket to non blocking mode.

Submitted by: Matt Stevenson <mavricknzwork yahoo.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@703998 13f79535-47bb-0310-9956-ffa450edef68
2008-10-13 10:06:28 +00:00
Jim Jagielski
4a268cc90a Allow for the smax param to be 0, so that all connections
are available to be dropped, should they be idle long
enough.
PR 43371


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697093 13f79535-47bb-0310-9956-ffa450edef68
2008-09-19 13:43:48 +00:00
Ruediger Pluem
0afe61c5bd * Introduce environment variable proxy-initial-not-pooled to avoid reusing
pooled connections if the client connection is an initial connection.
  This avoids the "proxy: error reading status line from remote server"
  error caused by the race condition that the backend server closed the
  connection after the connection check on our side and before our data
  reached the backend. Yes, this downgrades performance, especially with
  HTTP/1.0 clients. Hence it is configurable and off by default.

PR: 37770


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@684351 13f79535-47bb-0310-9956-ffa450edef68
2008-08-09 21:33:09 +00:00
Ruediger Pluem
b4e20c8e55 * Add the possibility to set a separate connection timeout for backend
workers.

PR: 45445
Submitted by: rahul <rahul sun.com>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@684341 13f79535-47bb-0310-9956-ffa450edef68
2008-08-09 20:52:46 +00:00
Ruediger Pluem
f18219717d * Remove call to apr_reslist_destroy. With the latest trunk version of
apr-util this causes a lock during shutdown as at the point of time we would
  execute apr_reslist_destroy the reslist is already destroyed, because we are
  in a cleanup of the same pool where the reslist registered itself as
  precleanup.
  With apr-util 1.3.x calling apr_reslist_destroy is not really useful and
  needed in this case as we are in a cleanup that was registered against the
  same pool that is used by the reslist. As it was registered *after* the
  reslist was created it just runs *before* the reslist cleanup would run. This
  is somewhat pointless here and we could leave the job of destroying the
  reslist to the reslist cleanup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@682369 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 12:53:50 +00:00
Jim Jagielski
3cb64b009a Use what we have. This logic belongs here anyway...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645807 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 09:25:57 +00:00
Jim Jagielski
b8f5af8cbe Note why we aren't bothering to check that we have
a valid octet here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@627740 13f79535-47bb-0310-9956-ffa450edef68
2008-02-14 13:37:18 +00:00
Jim Jagielski
d1858ec213 Add in mod_jk's disablereuse analog for mod_proxy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@627728 13f79535-47bb-0310-9956-ffa450edef68
2008-02-14 12:55:57 +00:00
Ruediger Pluem
c0ce91dc70 * Fix a typo (timout -> timeout)
PR: 44360
Submitted by: Rainer Jung <rainer.jung kippdata.de>
Reviewed by: rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@619125 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 19:52:04 +00:00