/[Apache-SVN]/httpd/httpd/trunk/modules/proxy/proxy_util.c
ViewVC logotype

Log of /httpd/httpd/trunk/modules/proxy/proxy_util.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 1920586 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 12 07:59:22 2024 UTC (7 months ago) by jorton
File length: 223121 byte(s)
Diff to previous 1919617 (colored)
Add Multipath TCP (MPTCP) support (Proxy)

Multipath TCP (MPTCP), standardized in RFC8684 [1],
is a TCP extension that enables a TCP connection to
use different paths.

Multipath TCP has been used for several use cases.
On smartphones, MPTCP enables seamless handovers between
cellular and Wi-Fi networks while preserving established
connections. This use-case is what pushed Apple to use
MPTCP since 2013 in multiple applications [2]. On dual-stack
hosts, Multipath TCP enables the TCP connection to
automatically use the best performing path, either IPv4
or IPv6. If one path fails, MPTCP automatically uses
the other path.

To benefit from MPTCP, both the client and the server
have to support it. Multipath TCP is a backward-compatible
TCP extension that is enabled by default on recent
Linux distributions (Debian, Ubuntu, Redhat, ...). Multipath
TCP is included in the Linux kernel since version 5.6 [3].
To use it on Linux, an application must explicitly enable
it when creating the socket. No need to change anything
else in the application.

Adding the possibility to create MPTCP sockets would thus
be a really fine addition to httpd, by allowing clients
to make use of their different interfaces.

This patch introduces the possibilty to connect to backend
servers using MPTCP. Note however that these changes are
only available on Linux, as IPPROTO_MPTCP is Linux specific
for the time being.

For proxies, we can connect using MPTCP by passing the
\"multipathtcp\" parameter:

ProxyPass \"/example\" \"http://backend.example.com\" multipathtcp=On

We then store this information in the worker and create sockets
appropriately according to this value.

Link: https://www.rfc-editor.org/rfc/rfc8684.html [1]
Link: https://www.tessares.net/apples-mptcp-story-so-far/ [2]
Link: https://www.mptcp.dev [3]
Add Multipath TCP (MPTCP) support (Core)

Multipath TCP (MPTCP), standardized in RFC8684 [1],
is a TCP extension that enables a TCP connection to
use different paths.

Multipath TCP has been used for several use cases.
On smartphones, MPTCP enables seamless handovers between
cellular and Wi-Fi networks while preserving established
connections. This use-case is what pushed Apple to use
MPTCP since 2013 in multiple applications [2]. On dual-stack
hosts, Multipath TCP enables the TCP connection to
automatically use the best performing path, either IPv4
or IPv6. If one path fails, MPTCP automatically uses
the other path.

To benefit from MPTCP, both the client and the server
have to support it. Multipath TCP is a backward-compatible
TCP extension that is enabled by default on recent
Linux distributions (Debian, Ubuntu, Redhat, ...). Multipath
TCP is included in the Linux kernel since version 5.6 [3].
To use it on Linux, an application must explicitly enable
it when creating the socket. No need to change anything
else in the application.

Adding the possibility to create MPTCP sockets would thus
be a really fine addition to httpd, by allowing clients
to make use of their different interfaces.

This patch introduces the possibility to listen with MPTCP
sockets. Note however that these changes are only available
on Linux, as IPPROTO_MPTCP is Linux specific for the time being.

To do so, we extended the Listen directive to include
a \"multipathtcp\" option, allowing to create MPTCP sockets
instead of regular TCP ones:

Listen 80 options=multipathtcp

We then store this information in flags for the listen directive
and create sockets appropriately according to this value.

Link: https://www.rfc-editor.org/rfc/rfc8684.html [1]
Link: https://www.tessares.net/apples-mptcp-story-so-far/ [2]
Link: https://www.mptcp.dev [3]

Submitted by: Aperence <anthony.doeraene hotmail.com>
Github: closes #476


Revision 1919617 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 1 11:35:26 2024 UTC (8 months, 2 weeks ago) by ylavic
File length: 223113 byte(s)
Diff to previous 1919533 (colored)
mod_proxy: Fix selection of ProxyPassMatch workers with host/port substitution. PR 69233.

With "ProxyPassMatch ^/([^/]+)/(.*)$ https://$1/$2", ap_proxy_get_worker_ex()
should not consider the length of scheme://host part of the given URL because
of the globbing match on the host part.

Fix it by setting worker->s>is_host_matchable when creating a worker with host
substitution and avoiding the min_match check in worker_matches() in this case.



Revision 1919533 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 26 14:40:44 2024 UTC (8 months, 3 weeks ago) by ylavic
File length: 222747 byte(s)
Diff to previous 1919532 (colored)
mod_proxy: Allow for empty UDS URL hostname in ProxyPass workers too.

Using "unix:/udspath|scheme:" or "unix:/udspath|scheme://" for a ProxyPass URL
does not work currently, while it works for SetHandler "proxy:unix:...".



Revision 1919532 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 26 14:36:25 2024 UTC (8 months, 3 weeks ago) by ylavic
File length: 222730 byte(s)
Diff to previous 1919024 (colored)
*) mod_proxy: Avoid AH01059 parsing error for SetHandler "unix:" URLs
   in <Location> (incomplete fix in 2.4.62). PR 69160.

When SetHandler "unix:..." is used in a <Location "/path"> block, the path 
gets appended (including $DOCUMENT_ROOT somehow) to r->filename hence the
current checks in fixup_uds_filename() to add "localhost" when missing don't
work. Fix them.



Revision 1919024 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 8 14:34:37 2024 UTC (9 months, 1 week ago) by ylavic
File length: 221896 byte(s)
Diff to previous 1919023 (colored)
Follow up to r1919023: fix compilation.

Revision 1919023 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 8 14:25:58 2024 UTC (9 months, 1 week ago) by ylavic
File length: 221895 byte(s)
Diff to previous 1919022 (colored)
mod_proxy: Don't mangle r->filename when ap_proxy_canon_netloc() fails.

ap_proxy_canon_netloc() called from the canon_handler hooks modifies its
given url in place, hence &r->filename[6] passed from ap_proxy_canon_url().

This is not an issue if the canon_handler hook succeeds (or declines) since
r->filename is usually completely rewritten finally, but on failure it gets
truncated.

Avoid this by passing a copy of r->filename from the start, the proxy *url
and r->filename don't need to point to the same data.

* proxy/proxy_util.c(ap_proxy_canon_url):
  Pass a copy of r->filename to the canon_handler hooks.



Revision 1919022 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 8 13:59:50 2024 UTC (9 months, 1 week ago) by ylavic
File length: 221874 byte(s)
Diff to previous 1919019 (colored)
mod_proxy: Fix canonicalisation and FCGI env (PATH_INFO, SCRIPT_NAME) for
           "balancer:" URLs set via SetHandler, also allowing for "unix:"
           sockets with BalancerMember(s).  PR 69168.

* modules/proxy/proxy_util.h, modules/proxy/proxy_util.c:
  Move proxy_interpolate() from mod_proxy.c to ap_proxy_interpolate(),
  exported locally only (non public).
  Move proxy_fixup() from mod_proxy.c to ap_proxy_canon_url(), exported
  locally only too (non public).
  Rollback ap_proxy_fixup_uds_filename() to a local fixup_uds_filename()
  usable from proxy_util.c only. The public function will be removed in
  a following commit.

* modules/proxy/mod_proxy.h:
  Note that ap_proxy_fixup_uds_filename() is deprecated.

* modules/proxy/mod_proxy.c:
  Just use ap_proxy_canon_url() from proxy_fixup() and proxy_handler()
  for SetHandler URLs.

* modules/proxy/mod_proxy_balancer.c:
  Do not canonicalize the path from proxy_balancer_canon() anymore but
  rather from balancer_fixup() where the balancer URL is rewritten to
  the BalancerMember URL.



Revision 1919019 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 8 13:07:23 2024 UTC (9 months, 1 week ago) by ylavic
File length: 218638 byte(s)
Diff to previous 1919015 (colored)
Follow up to r1919015: fix compilation.

Revision 1919015 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 8 12:35:35 2024 UTC (9 months, 1 week ago) by ylavic
File length: 218630 byte(s)
Diff to previous 1918647 (colored)
mod_proxy: Avoid AH01059 parsing error for SetHandler "unix:" URLs.  PR 69160

The hostname part of the URL is not mandated for UDS though the canon_handler
hooks will require it, so add "localhost" if it's missing (won't be used anyway
for an AF_UNIX socket).

This can trigger with SetHandler "unix:" URLs which are now also fixed up.



Revision 1918647 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 26 09:19:16 2024 UTC (9 months, 3 weeks ago) by ylavic
File length: 217830 byte(s)
Diff to previous 1918626 (colored)
mod_proxy: follow up to r1918626: Simplify ap_proxy_fixup_uds_filename() and callers.

Revision 1918626 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 25 23:49:09 2024 UTC (9 months, 3 weeks ago) by ylavic
File length: 217748 byte(s)
Diff to previous 1918606 (colored)
mod_proxy: Fixup UDS filename for mod_proxy called through r->handler.

* modules/proxy/proxy_util.c:
  Export ap_proxy_fixup_uds_filename() from fix_uds_filename.
  Call it from ap_proxy_pre_request() even for rewritten balancer workers.

* modules/proxy/mod_proxy.h:
  Declare ap_proxy_fixup_uds_filename()

* modules/proxy/mod_proxy.c:
  Fixup UDS filename from r->handler in proxy_handler().

* include/ap_mmn.h:
  Bump MMN minor for ap_proxy_fixup_uds_filename()



Revision 1918606 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 25 17:29:06 2024 UTC (9 months, 3 weeks ago) by covener
File length: 217754 byte(s)
Diff to previous 1918442 (colored)
validate hostname


Revision 1918442 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 19 14:37:20 2024 UTC (10 months ago) by ylavic
File length: 217446 byte(s)
Diff to previous 1918438 (colored)
mod_proxy: Follow up to r1918438: Don't cleanup conn before running the address cleanup.

* modules/proxy/proxy_util.c(ap_proxy_determine_address):
  Move conn_cleanup() after apr_pool_cleanup_run().



Revision 1918438 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 19 13:20:12 2024 UTC (10 months ago) by ylavic
File length: 217446 byte(s)
Diff to previous 1918429 (colored)
mod_proxy: Follow up to r1918412 and r1918429: Special case WIN32/OS2 only.

apr_socket_connect() on unixes does copy the passed in *addr, so limit the
liefetime workaround to Windows and OS/2 only (which don't).

* modules/proxy/proxy_util.c(ap_proxy_determine_address):
  #ifdef the relevant code for WIN32/OS2 only, and improve comment.



Revision 1918429 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 19 10:39:56 2024 UTC (10 months ago) by ylavic
File length: 217146 byte(s)
Diff to previous 1918412 (colored)
mod_proxy: Follow up to r1918412: Find if one of the conn->addr[->next] is alive.

ap_proxy_connect_backend() will use the first conn->addr[->next] that works, so
the current address alive can be any of them.

* modules/proxy/proxy_util.c(ap_proxy_determine_address):
  Loop for all conn->addr[->next] to determine if addr_alive.



Revision 1918412 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 18 14:20:06 2024 UTC (10 months ago) by ylavic
File length: 216639 byte(s)
Diff to previous 1918410 (colored)
mod_proxy: Keep connection alive on addressTTL expiry if the DNS didn't change.

* modules/proxy/proxy_util.c(address_cleanup):
  Rename to conn_cleanup() since it also closes the socket, and run
  socket_cleanup() first to avoid dangling conn->sock->remote_addr.

* modules/proxy/proxy_util.c(ap_proxy_determine_address):
  Compare the new address with the old one and keep the socket alive
  if it did not change.

Follow up to r1918410.



Revision 1918410 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 18 14:14:08 2024 UTC (10 months ago) by ylavic
File length: 215551 byte(s)
Diff to previous 1918228 (colored)
mod_proxy: Fix DNS requests and connections closed before the configured addressTTL.  BZ 69126

* modules/proxy/proxy_util.c(ap_proxy_determine_address):
  Fix shared expiry compare-and-swap loop.



Revision 1918228 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 10 10:46:32 2024 UTC (10 months, 1 week ago) by jorton
File length: 215561 byte(s)
Diff to previous 1916004 (colored)
* modules/proxy/proxy_util.c (worker_address_resolve): Fix debugging
  output when dumping multiple resolved addresses.


Revision 1916004 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 26 08:41:28 2024 UTC (13 months, 3 weeks ago) by jfclere
File length: 215561 byte(s)
Diff to previous 1913930 (colored)
Don't reset the balancer when we create a new child
and don't change shared memory the load balancer is not using.


Revision 1913930 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 18 13:49:04 2023 UTC (17 months ago) by ylavic
File length: 215666 byte(s)
Diff to previous 1913534 (colored)
mod_proxy: Follow up to r1912245: ap_proxy_ prefix for extern functions.

Even if they are not part of the API (not in mod_proxy.h) hence requires no
MMN bump, {get,set,increment_,decrement_}busy_count() being AP_PROXY_DECLARE()d
could name-collide with a third-party module's functions.

Rename them using the ap_proxy_ prefix, with an underscore after the verb for
for all of them too (for consistency), that is:
    ap_proxy_{get,set,increment,decrement}_busy_count()



Revision 1913534 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 2 15:06:44 2023 UTC (17 months, 2 weeks ago) by ylavic
File length: 215628 byte(s)
Diff to previous 1912941 (colored)
mod_proxy: Follow up to r1912459: Fix reuse of forward_info.

Use the correct fwd_pool for allocating the forward_info when the connection
is reusable as spotted by Rüdiger.

Do not reuse conn->forward if the ->proxy_auth changed.



Revision 1912941 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 13 13:51:43 2023 UTC (18 months, 1 week ago) by icing
File length: 215257 byte(s)
Diff to previous 1912462 (colored)
Fix format string type check


Revision 1912462 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 21 13:34:33 2023 UTC (18 months, 4 weeks ago) by ylavic
File length: 215258 byte(s)
Diff to previous 1912461 (colored)
mod_proxy: Simplify ap_proxy_get_worker_ex()

Factorize duplicated code in the balancer and non-balancer cases by adding
a new worker_matches() helper.

No functional change intended.



Revision 1912461 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 21 13:31:15 2023 UTC (18 months, 4 weeks ago) by ylavic
File length: 215737 byte(s)
Diff to previous 1912460 (colored)
mod_proxy: Add ap_proxy_worker_get_name() and deprecate ap_proxy_worker_name().

The latter requires a pool and returns a non constant string although it may
return worker shared data.

By computing the worker "UDS" name at init time we can return a constant name
in any case with no need for a pool, that's the new ap_proxy_worker_get_name().



Revision 1912460 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 21 13:24:28 2023 UTC (18 months, 4 weeks ago) by ylavic
File length: 215661 byte(s)
Diff to previous 1912459 (colored)
mod_proxy: Consistently close the socket on failure to reuse the connection.

proxy_connection_create() and ap_proxy_connect_backend() sometimes close the
connection on failure, sometimes not. Always close it.



Revision 1912459 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 21 13:15:35 2023 UTC (18 months, 4 weeks ago) by ylavic
File length: 215497 byte(s)
Diff to previous 1912245 (colored)
mod_proxy: Handle backend address renewal with address_ttl= parameter.

Define a new proxy_address struct holding the current/latest sockaddr in use
by each proxy worker and conn. Since backend addresses can be updated when
their TTL expires and while connections are being processed, each address is
refcounted and freed only when the last worker (or conn) using it grabs the
new one.

The lifetime of the addresses is handled at a single place by the new
ap_proxy_determine_address() function. It guarantees to bind the current/latest
backend address to the passed in conn (or do nothing if it's up to date already).
The function is called indirectly by ap_proxy_determine_connection() for the
proxy modules that use it, or directly by mod_proxy_ftp and mod_proxy_hcheck.
It also is called eventually by ap_proxy_connect_backend() when connect()ing all
the current addresses fails, to check (PROXY_DETERMINE_ADDRESS_CHECK) if some
new addrs are available.

This commit is also a rework of the lifetime of conn->addr, conn->hostname
and conn->forward, using the conn->uds_pool and conn->fwd_pool for the cases
where the backend is connected through a UDS socket and a remote CONNECT proxy
respectively.

* include/ap_mmn.h:
  Minor bump for new function/fields.

* modules/proxy/mod_proxy.h (struct proxy_address,
                             ap_proxy_determine_addresss()):
  Declare ap_proxy_determine_addresss() and opaque struct proxy_address,
  new fields to structs proxy_conn_rec/proxy_worker_shared/proxy_worker.

* modules/proxy/mod_proxy.c (set_worker_param):
  Parse/set the new worker->address_ttl parameter.

* modules/proxy/proxy_util.c (proxy_util_register_hooks(),
                              ap_proxy_initialize_worker(),
                              ap_proxy_connection_reusable(),
                              ap_proxyerror(), proxyerror_core(),
                              init_conn_pool(), make_conn_subpool(),
                              connection_make(), connection_cleanup(),
                              connection_constructor()):
 Initialize *proxy_start_time in proxy_util_register_hooks() as the epoch
 from which expiration times are relative (i.e. seconds stored in an uint32_t
 for atomic changes).
 Make sure worker->s->is_address_reusable and worker->s->disablereuse are
 consistant in ap_proxy_initialize_worker(), thus no need to check for both
 in ap_proxy_connection_reusable().
 New proxyerror_core() helper taking an apr_status_t to log, wrap in
 ap_proxyerror().
 New make_conn_subpool() to create worker->cp->{pool,dns} with their own
 allocator.
 New connection_make() helper to factorize code in connection_cleanup() and
 connection_constructor().

* modules/proxy/proxy_util.c (proxy_address_inc(), proxy_address_dec(),
                              proxy_address_cleanup(), proxy_address_set_expired(),
                              worker_address_get(), worker_address_set(),
                              worker_address_resolve(), proxy_addrs_equal(),
                              ap_proxy_determine_address(),
                              ap_proxy_determine_connection(),
                              ap_proxy_connect_backend()):
 Implement ap_proxy_determine_address() using the above helpers for atomic changes,
 and call it from ap_proxy_determine_connection() and ap_proxy_connect_backend().

* modules/proxy/mod_proxy_ftp.c (proxy_ftp_handler):
  Use ap_proxy_determine_address() and use the returned backend->addr.

* modules/proxy/mod_proxy_hcheck.c (hc_determine_connection, hc_get_backend,
                                    hc_init_worker, hc_watchdog_callback):
  Use ap_proxy_determine_address() in hc_determine_connection() and call the
  latter from hc_get_backend(), replace hc_init_worker() by hc_init_baton()
  which now calls hc_get_hcworker() and hc_get_backend() to resolve the first
  address at init time.

* modules/proxy/mod_proxy_http.c (proxy_http_handler):
  Use backend->addr and ->hostname instead of worker->cp->addr and
  worker->s->hostname_ex respectively.

* modules/proxy/mod_proxy_ajp.c (ap_proxy_ajp_request):
  Use backend->addr and ->hostname instead of worker->cp->addr and
  worker->s->hostname_ex respectively.


Closes #367



Revision 1912245 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 11 13:50:21 2023 UTC (19 months, 1 week ago) by jfclere
File length: 199469 byte(s)
Diff to previous 1910809 (colored)
Arrange the bybusyness logic and prevent bad busy values
this closes #383


Revision 1910809 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 6 07:44:21 2023 UTC (21 months, 2 weeks ago) by icing
File length: 195100 byte(s)
Diff to previous 1910704 (colored)
proxy_util: revert timeout selection on a proxy tunnel back to
take the large of client/origin values.

Add websocket test to verify that longer proxypass timeout is in
effect.



Revision 1910704 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 30 09:08:23 2023 UTC (21 months, 3 weeks ago) by icing
File length: 195101 byte(s)
Diff to previous 1910507 (colored)
proxy: in proxy tunnels, use the smaller timeout value of
       client and origin as timeout for polling the tunnel.



Revision 1910507 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 20 12:01:09 2023 UTC (22 months ago) by icing
File length: 195098 byte(s)
Diff to previous 1909464 (colored)
  *) mod_http2: added support for bootstrapping WebSockets via HTTP/2, as
     described in RFC 8441. A new directive 'H2WebSockets on|off' has been
     added. The feature is by default not enabled.
     As also discussed in the manual, this feature should work for setups
     using "ProxyPass backend-url upgrade=websocket" without further changes.
     Special server modules for WebSockets will have to be adapted,
     most likely, as the handling if IO events is different with HTTP/2.
     HTTP/2 WebSockets are supported on platforms with native pipes. This
     excludes Windows.



Revision 1909464 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 28 06:20:27 2023 UTC (23 months, 3 weeks ago) by rpluem
File length: 192850 byte(s)
Diff to previous 1909451 (colored)
* In the reverse proxy case when we only want to keep encoded slashes untouched
  we can have decoded '%''s in the URI that got sent to us in the original URL
  as %25. Don't error out in this case but just fall through and have them
  encoded to %25 when forwarding to the backend.

PR: 66580


Revision 1909451 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 27 08:15:20 2023 UTC (23 months, 3 weeks ago) by rpluem
File length: 192265 byte(s)
Diff to previous 1909402 (colored)
* If we fail to connect to all looked up IP's from the worker lookup cache it
  might be caused by a change on DNS side. Try another DNS lookup in this case
  and in case this causes a successful connection trigger a refresh of the
  worker lookup cache.


Revision 1909402 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 25 12:04:09 2023 UTC (23 months, 3 weeks ago) by rpluem
File length: 190932 byte(s)
Diff to previous 1909401 (colored)
* Rephrase comment [skip ci]

Revision 1909401 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 25 11:57:22 2023 UTC (23 months, 3 weeks ago) by rpluem
File length: 190918 byte(s)
Diff to previous 1909400 (colored)
* Clear the dns_pool before to avoid a memory leak in case we did the lookup
  again.


Revision 1909400 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 25 11:52:17 2023 UTC (23 months, 3 weeks ago) by rpluem
File length: 190709 byte(s)
Diff to previous 1908628 (colored)
* For retriggering a DNS lookup worker->cp->addr should be set to NULL and thus
  we need to avoid a race that worker->cp->addr switches to NULL after we
  checked it to be non NULL but before we assign it to conn->addr in an else
  tree which would leave conn->addr to NULL and likely cause a segfault later.


Revision 1908628 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 22 08:01:31 2023 UTC (2 years ago) by rpluem
File length: 190288 byte(s)
Diff to previous 1908341 (colored)
* Whitespace fixes. No functional change.

Revision 1908341 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 13 10:24:30 2023 UTC (2 years, 1 month ago) by rpluem
File length: 190287 byte(s)
Diff to previous 1907565 (colored)
Do not double encode encoded slashes

In case that AllowEncodedSlashes is set to NoDecode do not double encode
encoded slashes in the URL sent by the reverse proxy to the backend.

* include/ap_mmn.h: Document the addition of ap_proxy_canonenc_ex to the API.

* modules/proxy/mod_proxy.h: Declare ap_proxy_canonenc_ex and define flag
      values.

* modules/proxy/proxy_util.c: Implement ap_proxy_canonenc_ex by modifying
      ap_proxy_canonenc accordingly and reimplement ap_proxy_canonenc to
      use ap_proxy_canonenc_ex with the appropriate flag.

* modules/http2/mod_proxy_http2.c, modules/proxy/mod_proxy_*.c: Set the
      correct flag based on the AllowEncodedSlashes configuration and use
      ap_proxy_canonenc_ex instead of ap_proxy_canonenc.


Revision 1907565 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 10 16:17:54 2023 UTC (2 years, 2 months ago) by rpluem
File length: 189175 byte(s)
Diff to previous 1904513 (colored)
* Optimize code: We know that we already have a valid encoding string,
  because we just decoded it. Hence just copy what we have instead of
  redoing it.


Revision 1904513 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 11 09:53:04 2022 UTC (2 years, 6 months ago) by ylavic
File length: 189147 byte(s)
Diff to previous 1901497 (colored)
mod_proxy: Ignore (and warn about) enablereuse=on for ProxyPassMatch when
           some dollar substitution (backreference) happens in the hostname
           or port part of the URL.

Address or connection reuse can't work when the autority part of the URL is
dynamic (single origin server[:port] handled/assumed in the reslist). Detect
such cases and unset worker->s->is_address_reusable to disable reuse regardless
of enablereuse/disablereuse.

* modules/proxy/proxy_util.c(ap_proxy_define_worker_ex):
  Lookup for $n substitution in the hostname[:port] when parsing the URL and
  if present, set worker->->is_address_reusable=0 / worker->s->disablereuse=1.

* modules/proxy/proxy_util.c(ap_proxy_initialize_worker):
  Don't overwrite worker->s->is_address_reusable from enablereuse/disablereuse
  parameters, and set both consistently.

* docs/manual/mod/mod_proxy.xml:
  Add ProxyPassMatch compatibility note about key=value parameters handled with
  $n substitutions since 2.4.47.
  Document the specificities of enablereuse/disablereuse w.r.t. $n subsitutions
  in the different part of the URL.
  Axe the note about unparsable URLs when the $n substitution happens in the
  port, this has been addressed in 2.4.47 too (and works now).



Revision 1901497 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 1 12:30:46 2022 UTC (2 years, 10 months ago) by covener
File length: 187133 byte(s)
Diff to previous 1901486 (colored)
use a liberal default limit for LimitRequestBody of 1GB

Revision 1901486 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 1 10:23:31 2022 UTC (2 years, 10 months ago) by ylavic
File length: 187755 byte(s)
Diff to previous 1901485 (colored)
mod_proxy: Follow up to r1901485: Don't shadow upper 'val' variable.



Revision 1901485 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 1 09:56:43 2022 UTC (2 years, 10 months ago) by ylavic
File length: 187771 byte(s)
Diff to previous 1901461 (colored)
mod_proxy: Let fixup hooks know about the Host header (and eventually overwrite it).

If proxy_run_fixups() sets a Host header there will be two ones sent to the
origin server.

Instead, let the hooks know about the Host by setting it in the r->headers_in
passed to proxy_run_fixups(), and use the actual value afterwards.
Note: if proxy_run_fixups() unsets the Host we'll keep ours.

Suggested by: rpluem



Revision 1901461 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 31 15:26:12 2022 UTC (2 years, 10 months ago) by ylavic
File length: 187409 byte(s)
Diff to previous 1901460 (colored)
mod_proxy: ap_proxy_create_hdrbrgd() to clear hop-by-hop first and fixup last.

So that ap_proxy_clear_connection() runs on the original headers only and
proxy_run_fixups() on the final ones.



Revision 1901460 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 31 15:06:13 2022 UTC (2 years, 10 months ago) by ylavic
File length: 187375 byte(s)
Diff to previous 1901446 (colored)
mod_proxy: Align ap_proxy_create_hdrbrgd() with 2.4.x's.

In 2.4.x, the copy of r->headers_in is left in r->headers_in for the whole
function, while the original r->headers_in are restored at the end. This
is simpler and avoids the r->headers_in <=> saved_headers_in danse when
calling a function that modifies r->headers_in in place.

Align with 2.4.x, no functional change.



Revision 1901446 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 31 11:05:41 2022 UTC (2 years, 10 months ago) by ylavic
File length: 187432 byte(s)
Diff to previous 1901420 (colored)
mod_proxy_http: Follow up to r1901420: consistent 100-continue checks.

Let proxy_http_handler() tell ap_proxy_create_hdrbrgd() whether to add or
preserve Expect header or not, through the "proxy-100-continue" note.



Revision 1901420 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 30 15:54:34 2022 UTC (2 years, 10 months ago) by ylavic
File length: 187260 byte(s)
Diff to previous 1900028 (colored)
mod_proxy_http: Avoid 417 responses for non forwardable 100-continue. PR 65666.

Stop returning 417 when mod_proxy has to forward an HTTP/1.1 request with both
"Expect: 100-continue" and "force-proxy-request-1.0" set, mod_proxy can instead
handle the 100-continue by itself before forwarding the request, like in the
"Proxy100Continue Off" case.

Note that this does not change the behaviour of httpd receiving an HTTP/1.0
request with an Expect header, ap_check_request_header() will still correctly
return 417 in this case.



Revision 1900028 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 19 09:14:10 2022 UTC (3 years ago) by rjung
File length: 187397 byte(s)
Diff to previous 1899550 (colored)
  *) mod_proxy: Add backend port to log messages to
     ease identification of involved service.


Revision 1899550 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 4 09:41:25 2022 UTC (3 years ago) by icing
File length: 186522 byte(s)
Diff to previous 1899547 (colored)
  *) core: add ap_h1_append_header() for single header values.
  *) mod_proxy: use of new ap_h1_header(s) functions for
     formatting HTTP/1.1 requests.



Revision 1899547 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 4 08:24:09 2022 UTC (3 years ago) by icing
File length: 187154 byte(s)
Diff to previous 1898255 (colored)
  *) core/mod_http/mod_http2:
     - adds new meta bucket types REQUEST, RESPONSE and HEADERS to the API.
     - adds a new method for setting standard response headers Date and Server
     - adds helper methods for formatting parts of HTTP/1.x, like headers and 
       end chunks for use in non-core parts of the server, e.g. mod_proxy
     - splits the HTTP_IN filter into a "generic HTTP" and "specific HTTP/1.x" 
       filter. The latter one named HTTP1_BODY_IN.
     - Uses HTTP1_BODY_IN only for requests with HTTP version <= 1.1
     - Removes the chunked input simulation from mod_http2
     - adds body_indeterminate flag to request_rec that indicates that a request 
       body may be present and needs to be read/discarded. This replaces logic 
       that thinks without Content-Length and Transfer-Encoding, no request 
       body can exist.



Revision 1898255 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 20 15:08:30 2022 UTC (3 years, 1 month ago) by jailletc36
File length: 187101 byte(s)
Diff to previous 1898127 (colored)
Remove some APR 0.x stuff.

The minimum supported version is 1.3 in 2.4.x

Revision 1898127 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 16 12:35:36 2022 UTC (3 years, 2 months ago) by rpluem
File length: 187209 byte(s)
Diff to previous 1895986 (colored)
* Change the logic to choose the maximum of both timeouts (front end socket,
  backend socket) instead of the minimum as backend timeouts can be
  configured more selectively (per worker if needed) as front end timeouts
  and typically the backend timeouts reflect the application requirements
  better.

PR: 65886


Revision 1895986 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 15 12:47:05 2021 UTC (3 years, 4 months ago) by ylavic
File length: 187210 byte(s)
Diff to previous 1895981 (colored)
mod_proxy: Axe useless setting of *balancer to NULL in ap_proxy_pre_request()

It's already NULL per the enclosing "if" test.

Also, while at a non-functional change, break a close long log line to <80 col.



Revision 1895981 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 15 11:35:36 2021 UTC (3 years, 4 months ago) by ylavic
File length: 187275 byte(s)
Diff to previous 1895914 (colored)
mod_proxy: follow up to r1895921: Don't prevent forwarding URIs w/ no hostname.

r1895921 changed proxy_detect() to disable forward proxying for URIs with no
hostname which is wrong, there might exist a third-party proxy module handling
the "urn:" scheme for instance (thanks Roy for the catch!).

For this to work, we also need to leave the forward proxied URI alone in
ap_proxy_pre_request() with no UDS special case or alike, a proxy module can
then catch (or not) the original URI as expected.



Revision 1895914 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 13 18:07:22 2021 UTC (3 years, 4 months ago) by ylavic
File length: 187076 byte(s)
Diff to previous 1895304 (colored)
mod_proxy: Detect unix: scheme syntax errors at load time.

* modules/proxy/mod_proxy.c(add_pass, add_member, set_proxy_param,
                            proxysection):
  Check return value of ap_proxy_de_socketfy().

* modules/proxy/proxy_util.c(ap_proxy_get_worker_ex):
  Check return value of ap_proxy_de_socketfy().



Revision 1895304 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 24 17:49:47 2021 UTC (3 years, 4 months ago) by ylavic
File length: 187033 byte(s)
Diff to previous 1894290 (colored)
mod_proxy: SetEnv proxy-nohalfclose to disable half-close tunneling. PR 65662.

Some connect/wstunnel protocols might want half-close forwarding while some
might not, let's provide an r->subprocess_env opt-out.



Revision 1894290 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 15 11:09:32 2021 UTC (3 years, 6 months ago) by ylavic
File length: 186597 byte(s)
Diff to previous 1893603 (colored)
mod_proxy_connect: Honor the smallest of the backend or client timeout.

It seems that mod_proxy_connect has never applied any timeout in its tunneling
loop. Address this by setting a default timeout in ap_proxy_tunnel_create()
since mod_proxy_connect does not overwrite tunnel->timeout (while proxy_http
and proxy_wstunnel do).

This default timeout is set to the smallest of the backend side or the client
side timeout.

PR 65631, 65662, 65689



Revision 1893603 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 24 15:52:50 2021 UTC (3 years, 6 months ago) by ylavic
File length: 186234 byte(s)
Diff to previous 1893595 (colored)
mod_proxy: Add tunnel_forward hook.

* modules/proxy/mod_proxy.h, modules/proxy/mod_proxy.c:
  Declare/implement the hook.

* modules/proxy/proxy_util.c(proxy_transfer):
  Run tunnel_forward hooks when called by the tunneling loop.
  Simpler input/output brigade cleanup on exit.



Revision 1893595 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 24 11:25:42 2021 UTC (3 years, 6 months ago) by ylavic
File length: 184554 byte(s)
Diff to previous 1893594 (colored)
mod_proxy: Handle ap_proxy_buckets_lifetime_transform() errors.

* modules/proxy/mod_proxy.h,modules/proxy/proxy_util.c:
  Add ap_proxy_fill_error_brigade() to factorize proxy error handling
  on the client connection side.

* modules/proxy/mod_proxy_{http,ajp,uwsgi}.c:
  Use ap_proxy_fill_error_brigade() where needed, including when an
  empty brigade is returned on the backend side or when calling
  ap_proxy_buckets_lifetime_transform fails.



Revision 1893594 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 24 10:27:16 2021 UTC (3 years, 6 months ago) by ylavic
File length: 183109 byte(s)
Diff to previous 1893593 (colored)
mod_proxy: Restore ap_proxy_transfer_between_connections().

* modules/proxy/mod_proxy.h:
  Restore the interface of ap_proxy_transfer_between_connections() back to
  before MMN 20210506.0.
  Add ap_proxy_tunnel_conn_bytes_in() and ap_proxy_tunnel_conn_bytes_out().
  New proxy_tunnel_conn_t typedef'ed from opaque struct proxy_tunnel_conn.

* modules/proxy/mod_proxy.h(ap_proxy_tunnel_conn_get_read,
                            ap_proxy_tunnel_conn_get_transferred):
  Axed/replaced by ap_proxy_tunnel_conn_bytes_in() and
  ap_proxy_tunnel_conn_bytes_out().

* modules/proxy/proxy_util.c(struct proxy_tunnel_conn):
  Replace "exchanged" by "bytes_in" and "bytes_out".

* modules/proxy/proxy_util.c(proxy_transfer):
  New helper implementing ap_proxy_transfer_between_connections() and
  returning both &bytes_in and &bytes_out.

* modules/proxy/proxy_util.c(ap_proxy_transfer_between_connections):
  Now calls proxy_transfer().

* modules/proxy/proxy_util.c(ap_proxy_tunnel_conn_bytes_in,
                             ap_proxy_tunnel_conn_bytes_out):
  Return tc->bytes_in and tc->bytes_out respectively.

* modules/proxy/proxy_util.c(proxy_tunnel_forward):
  Use proxy_transfer() which updates in->bytes_in, &out->bytes_out.
  tunnel->replied will be updated in proxy_tunnel_run().

* modules/proxy/proxy_util.c(proxy_tunnel_forward):
  Fall through the "done" label in any case to set tunnel->replied based
  on tunnel->client->bytes_out > 0.

* modules/proxy/mod_proxy_http.c(ap_proxy_http_process_response):
  Use ap_proxy_tunnel_conn_bytes_{in,out}() for worker->s->{read,transferred}
  accounting.

* modules/proxy/mod_proxy_http.c(proxy_http_async_finish):
  Update worker->s->{read,transferred} when async too.



Revision 1893593 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 24 10:09:23 2021 UTC (3 years, 6 months ago) by ylavic
File length: 182468 byte(s)
Diff to previous 1893519 (colored)
mod_proxy: typedef struct proxy_tunnel_conn proxy_tunnel_conn_t.



Revision 1893519 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 22 18:47:09 2021 UTC (3 years, 6 months ago) by ylavic
File length: 182508 byte(s)
Diff to previous 1893184 (colored)
mod_proxy: Handle UDS URIs with empty hostname as if they had no hostname.

It was reported to me (privately) that r1893101 broke existing settings like:
  SetHandler "proxy:unix:///path/to/uds.sock|fcgi://localhost/"

RFC 3986 (section 3.2.2) says that:
   If the URI scheme defines a default for host, then that default
   applies when the host subcomponent is undefined or when the
   registered name is empty (zero length).  For example, the "file" URI
   scheme is defined so that no authority, an empty host, and
   "localhost" all mean the end-user's machine, whereas the "http"
   scheme considers a missing authority or empty host invalid.

Let's consider that the "unix" scheme is closer to the "file" scheme than
the "http" one, and accept "unix:///path/to/uds.sock" as a valid URI.



Revision 1893184 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 16:55:24 2021 UTC (3 years, 7 months ago) by ylavic
File length: 182432 byte(s)
Diff to previous 1892987 (colored)
core: Add ap_create_connection() to create a server or client/proxy connection.

c->outgoing shouldn't be set by mod_ssl, ap_create_connection() allows that
and this commit also replaces all the calls to ap_run_create_connection() in
mod_proxy modules (not in the MPMs which create incoming connections only).

* include/http_connection.h, server/connection.c:
  Declare and implement ap_create_connection().

* modules/proxy/proxy_util.c, modules/proxy/mod_proxy_connect.c,
  modules/proxy/mod_proxy_ftp.c:
  Use ap_create_connection() instead of ap_run_create_connection(), and don't
  provide a connection_id a scoreboard handle for outgoing connection.

* server/log.c(do_errorlog_default):
  Use c->outgoing instead of c->sbh to determine if it's a "client" or "remote"
  connection.



Revision 1892987 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 6 11:21:49 2021 UTC (3 years, 7 months ago) by ylavic
File length: 182489 byte(s)
Diff to previous 1892986 (colored)
mod_proxy: Follow up to r1892986: APLOGNO()

Stefan get out of this body! :)


Revision 1892986 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 6 11:06:53 2021 UTC (3 years, 7 months ago) by ylavic
File length: 182484 byte(s)
Diff to previous 1892921 (colored)
mod_proxy: Follow up to r1892814.

* modules/proxy/proxy_util.c(fix_uds_filename):
  Sanity checks on the configured UDS path, fail with 500 if invalid since
  continuing through proxy processing wouldn't work as expected.



Revision 1892921 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 5 08:31:04 2021 UTC (3 years, 7 months ago) by jailletc36
File length: 182131 byte(s)
Diff to previous 1892851 (colored)
Fix a compilation error in the configuration where this is compiled.

Unless I missed something, it is broken since r1516930 (Aug 23 2013).

So no-one has compiled this for more than 8 years.
Sounds like dead code.

Revision 1892851 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 3 11:08:16 2021 UTC (3 years, 7 months ago) by ylavic
File length: 182133 byte(s)
Diff to previous 1892814 (colored)
mod_proxy: Follow up to r1892740.

Really remove the old ap_filter_input_pending() handling forgotten by r1892740.


Revision 1892814 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 2 12:37:02 2021 UTC (3 years, 7 months ago) by ylavic
File length: 182608 byte(s)
Diff to previous 1892740 (colored)
mod_proxy: Faster unix socket path parsing in the "proxy:" URL.

The actual r->filename format is "[proxy:]unix:path|url" for UDS, no need to
strstr(,"unix:") since it's at the start of the string.


Revision 1892740 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 30 18:04:20 2021 UTC (3 years, 7 months ago) by ylavic
File length: 182578 byte(s)
Diff to previous 1892468 (colored)
mod_proxy: Fix potential tunneling infinite loop and spurious timeout.
           PRs 65521 and 65519.

* modules/proxy/proxy_util.c(ap_proxy_tunnel_run):
  Avoid an infinite loop by shutting down the connection for write when poll()
  returns POLLHUP and read is already down.  PR 65521.

* modules/proxy/proxy_util.c(ap_proxy_tunnel_run):
  When write completion is finished don't check for ap_filter_input_pending()
  before proxy_tunnel_forward() to flush input data, this is a nonblocking read
  already which will do the same thing implicitely. ap_filter_input_pending()
  is broken in 2.4.x without the whole pending data mechanism (not backported
  yet), so let's align here.  PR 65519.



Revision 1892468 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 20 09:36:19 2021 UTC (3 years, 8 months ago) by ylavic
File length: 181668 byte(s)
Diff to previous 1891591 (colored)
core: follow up to r1891148: WC bucket defaulting to FLUSH bucket.

Define WC bucket semantics as:
/**
 * @brief Write Completion (WC) bucket
 *
 * A WC bucket is a FLUSH bucket with special ->data == &ap_bucket_wc_data,
 * still both AP_BUCKET_IS_WC() and APR_BUCKET_IS_FLUSH() hold for them so
 * they have the same semantics for most filters, namely:
 *   Everything produced before shall be passed to the next filter, including
 *   the WC/FLUSH bucket itself.
 * The distinction between WC and FLUSH buckets is only for filters that care
 * about write completion (calling ap_filter_reinstate_brigade() with non-NULL
 * flush_upto), those can setaside WC buckets and the preceding data provided
 * they have first determined that the next filter(s) have pending data
 * already, usually by calling ap_filter_should_yield(f->next).
 */

The only filters that care about write completion for now are
ap_core_output_filter() and ssl_io_filter_output(), which try to fill
in the pipe as much as possible, using ap_filter_reinstate_brigade(&flush_upto)
to determine whether they should flush (blocking) or setaside their remaining
data.

So ap_filter_reinstate_brigade() is made to not treat WC as FLUSH buckets and
keep the above filters working as before (and correctly w.r.t. above WC bucket
semantics).

* include/ap_mmn.h, include/util_filter.h:
  Axe specific ap_bucket_type_wc and define global &ap_bucket_wc_data address to
  mark WC buckets checked by AP_BUCKET_IS_WC().

* server/util_filter.c (ap_filter_reinstate_brigade):
  Don't treat WC buckets as FLUSH buckets.



Revision 1891591 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 16 16:18:44 2021 UTC (3 years, 9 months ago) by jailletc36
File length: 181597 byte(s)
Diff to previous 1891477 (colored)
Follow-up to r1891477.

Axe a few lines of code and document a potential optimization

Revision 1891477 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 12 10:32:21 2021 UTC (3 years, 9 months ago) by ylavic
File length: 181657 byte(s)
Diff to previous 1891284 (colored)
mod_proxy: Fix icomplete initialization of BalancerMember(s) from the manager.

Clear the workers created in ap_proxy_sync_balancer(), notably ->local_status
for below ap_proxy_initialize_worker() to initialize all the child structures
like ->cp and ->cp->reslist, avoiding a possible crash when the workers are
used at runtime.


Revision 1891284 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 5 16:23:33 2021 UTC (3 years, 9 months ago) by ylavic
File length: 181677 byte(s)
Diff to previous 1891216 (colored)
mod_proxy: Avoid confusion of prefix/regex matching workers at loading.  PR 65429.

ap_proxy_get_worker() needs to know whether it should lookup for prefix or
match or both matching workers, depending on the context.

For instance <Proxy[Match]> or ProxyPass[Match] directives need to lookup for
an existing worker with the same type as the directive (*Match or not), because
they will define one with that matching type if none exists.

On the contrary, "ProxySet <url>" at load time or ap_proxy_pre_request() at run
time need to find a worker matching an url whether it's by prefix or by regex.

So this commit adds ap_proxy_get_worker_ex() which takes a bitmask for the
matching type and calls it appropriately where needed.

For consistency, ap_proxy_define_worker_ex() is also added, using the same
bitmask flags, deprecating ap_proxy_define_match_worker().

Follow up to r1891206.


Revision 1891216 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 2 22:09:10 2021 UTC (3 years, 9 months ago) by ylavic
File length: 180176 byte(s)
Diff to previous 1891206 (colored)
mod_proxy: Follow up to r1891206: fix UDS scheme.


Revision 1891206 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 2 14:58:46 2021 UTC (3 years, 9 months ago) by ylavic
File length: 180160 byte(s)
Diff to previous 1891148 (colored)
mod_proxy: Fix possible reuse/merging of Proxy(Pass)Match workers.  PR 65419.

We can't truncate ProxyMatch's worker name/url to the first '$' substitution
without possibly colliding with other workers. This also makes the matching
done at runtime by ap_proxy_strcmp_ematch() completely pointless.

To fix this and still address r1878467 (i.e. make http://host:port$1 a "valid"
URL), we need to remove '$' substitutions from the :port part of the URL only
since it's allowed anywhere else by apr_uri_parse().

So let's strip them before apr_uri_parse() and prepend them back in the path
before apr_uri_unparse() to restore the original URL. Non-matchable workers are
not concerned so ap_proxy_define_worker() is made a local helper (w/o the ap_
prefix) which takes "matchable" as argument and can then be called by both
ap_proxy_define_[match_]worker() functions.


Revision 1891148 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 29 21:16:21 2021 UTC (3 years, 9 months ago) by ylavic
File length: 178137 byte(s)
Diff to previous 1889550 (colored)
core: Write Completion (WC) bucket type.

A WC bucket is meant to prevent buffering/coalescing filters from retaining
data, but unlike a FLUSH bucket it won't cause the core output filter to
block trying to flush anything before.

It can be passed by async handlers which want to never block, followed by
ap_filter_should_yield() to check for pending data and eventually suspend
processing until MPM/asynchronous write completion finishes.

In this commit it's used that way by the tunneling loop of mod_proxy to
prevent SSL coaslescing.

gh: closes #200


Revision 1889550 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 6 06:25:09 2021 UTC (3 years, 11 months ago) by jfclere
File length: 178279 byte(s)
Diff to previous 1887720 (colored)
Allow the tunnelled connections to report the
read and trasnfered to the back-end worker.


Revision 1887720 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 16 12:55:18 2021 UTC (4 years, 1 month ago) by jorton
File length: 177967 byte(s)
Diff to previous 1885239 (colored)
* modules/proxy/proxy_util.c (ap_proxy_define_balancer):
  Fix leak in error path in the do_malloc case, caught by covscan.


Revision 1885239 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 7 13:19:08 2021 UTC (4 years, 3 months ago) by ylavic
File length: 177891 byte(s)
Diff to previous 1884280 (colored)
mod_proxy_wstunnel: leave Upgrade requests handling to mod_proxy_http.

Let mod_proxy_http's canon and scheme handlers accept "ws[s]:" schemes so that
mod_proxy_wstunnel can decline requests when mod_proxy_http is loaded.

* modules/proxy/{mod_proxy.h,proxy_util.c} (ap_proxy_worker_can_upgrade):
  Add a "dflt" argument to ap_proxy_worker_can_upgrade() which, if not NULL,
  is matched when no worker upgrade= parameter is configured. This allows to
  handle the default "Upgrade: websocket" case for "ws[s]:" schemes.

* modules/proxy/mod_proxy_http.c (proxy_http_canon, proxy_http_handler):
  Add and use the new get_url_scheme() helper to parse URL schemes handled by
  mod_proxy_http and use it in canon and scheme handlers. This helper now
  accepts ws[s] schemes.

* modules/proxy/mod_proxy_wstunnel.c (proxy_wstunnel_post_config):
  New post_config hook to detect whether mod_proxy_http is loaded and set
  global fallback_to_mod_proxy_http flag in this case.

* modules/proxy/mod_proxy_wstunnel.c (proxy_wstunnel_check_trans,
                                      proxy_wstunnel_canon,
                                      proxy_wstunnel_handler):
  These hooks now early return DECLINED if fallback_to_mod_proxy_http is set.


Revision 1884280 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 10 16:04:34 2020 UTC (4 years, 4 months ago) by ylavic
File length: 177661 byte(s)
Diff to previous 1884067 (colored)
Revert r1480058, -1'ed on dev@ and STATUS.

Never backported (and never will supposedly), while often creating
merge conflicts.

See https://lists.apache.org/thread.html/be0e7bdc3510fddd2dd80accece44917eba361ef4fcc713dd0f7f7fa%401367999236%40%3Cdev.httpd.apache.org%3E
and https://lists.apache.org/thread.html/6e63271b308a2723285d288857318e7bb51b6756690514d9bc75a71b%401371148914%40%3Ccvs.httpd.apache.org%3E


Revision 1884067 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 3 14:06:17 2020 UTC (4 years, 4 months ago) by ylavic
File length: 177573 byte(s)
Diff to previous 1883744 (colored)
mod_proxy: provide prefetching and spooling mechanisms to all proxy modules.

Export ap_proxy_prefetch_input(), ap_proxy_spool_input() and
ap_proxy_read_input() from mod_proxy_http to mod_proxy.h/proxy_util.c so
that they are usable by all proxy modules.

mod_proxy_fcgi will use them in a following commit.


Revision 1883744 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 23 11:03:45 2020 UTC (4 years, 4 months ago) by ylavic
File length: 166821 byte(s)
Diff to previous 1881790 (colored)
mod_proxy: pconf vs pchild consistency, and correctness in ONE_PROCESS mode.

Consistently use pconf for ap_proxy_define_{worker,balancer}() and pchild for
ap_proxu_initialize_{worker,balancer}() in mod_proxy [child_]init code.

pchild is needed in _initialize() for mutexes/shms' child_init and cleanup,
and to avoid a crash on shutdown (i.e. ap_terminate) in ONE_PROCESS mode,
where worker->cp->pool is destroyed twice, let's register conn_pool_cleanup()
as a pre_cleanup of pchild.


Revision 1881790 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 17 11:31:43 2020 UTC (4 years, 7 months ago) by jorton
File length: 166894 byte(s)
Diff to previous 1880200 (colored)
mod_proxy: Add support for an optional third argument to ProxyRemote*
to configure the Basic auth credentials to send to the remote proxy.

(Note that credentials are always sent w/o waiting for a challenge as
with proxy-chain-auth, and only Basic is supported - both of which are
not exactly ideal - but better than nothing.)

* modules/proxy/mod_proxy.h (struct proxy_remote): Add creds field.

* modules/proxy/mod_proxy.c (proxy_handler): Pass forward proxy
  credentials via r->notes.
  (add_proxy): Take credentials and base64-encode into ->creds field if
  passed.
  (add_proxy_noregex, add_proxy_regex): Take optional creds argument.

* modules/proxy/proxy_util.c (ap_proxy_determine_connection):
  Use proxy credentials from r->notes if available.
  (ap_proxy_create_hdrbrgd): Set Proxy-Authorization header from
  credentials in r->notes if present.

PR: 37355
Github: closes #135


Revision 1880200 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 23 12:00:04 2020 UTC (4 years, 8 months ago) by ylavic
File length: 166506 byte(s)
Diff to previous 1879416 (colored)
mod_proxy: follow up to r1879401: call filters on tunnel POLLERR.

proxy_util.c:
    Set POLLERR in reqevents for pollset providers that require it to detect
    socket errors (like select() based one).
    Call filters to read/write on POLLERR socket event, so that they know about
    the error by experiencing the failure. If no POLLIN|POLLOUT is returned
    with POLLERR (depending on the system or pollset provider), go with the
    requested read or write event handling.
    Restore ap_proxy_transfer_between_connections() so that it always tries to
    read first (i.e. move yielding conditions afterward).
    Add proxy_tunnel_forward() helper that calls transfer_between_connections()
    and handles errors pollset updates.
    Call proxy_tunnel_forward() when write completion finishes and there are
    pending input data.

mod_proxy.h:
    Add read_buf_size to proxy_tunnel_rec (trunk only, no MMN minor bump).



Revision 1879416 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 1 23:16:04 2020 UTC (4 years, 9 months ago) by ylavic
File length: 165572 byte(s)
Diff to previous 1879402 (colored)
mod_ssl: release coalesced data when called from ap_filter_output_pending().

The purpose of ap_filter_output_pending() is to flush pending data, so
ssl_io_filter_coalesce() should honor that.

This allows mod_proxy to not care about mod_ssl coalescing filters when
tunneling between connections.


Revision 1879402 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 1 16:44:15 2020 UTC (4 years, 9 months ago) by ylavic
File length: 165855 byte(s)
Diff to previous 1879401 (colored)
mod_proxy: reindent ap_proxy_transfer_between_connections() after r1879401.

No functional change.


Revision 1879401 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 1 16:35:48 2020 UTC (4 years, 9 months ago) by ylavic
File length: 166051 byte(s)
Diff to previous 1879000 (colored)
mod_proxy: improved and reentrant tunneling loop.

modules/proxy/mod_proxy.h:
    Rename AP_PROXY_TRANSFER_SHOULD_YIELD to AP_PROXY_TRANSFER_YIELD_PENDING
    and add AP_PROXY_TRANSFER_YIELD_MAX_READS.

modules/proxy/mod_proxy_http.c:
modules/proxy/mod_proxy_wstunnel.c:
    Removing of reqtimeout filter is now handled by ap_proxy_tunnel_create().

modules/proxy/proxy_util.c:
    ap_proxy_transfer_between_connections():
        Reorganize loop to break out early.
        When AP_PROXY_TRANSFER_YIELD_PENDING, if !ap_filter_should_yield() we
        still need to run and check ap_filter_output_pending() since it may
        release pending data.
        When AP_PROXY_TRANSFER_YIELD_MAX_READS, stop the loop after too much
        reads (PROXY_TRANSFER_MAX_READS = 10000) to release the thread and
        give the caller a chance to schedule the other direction.
        Don't return APR_INCOMPLETE when it comes from an incomplete body
        detected by ap_http_filter().

    ap_proxy_tunnel_create():
        Start with POLLOUT on both directions so that any pending output data
        is flushed first.

    ap_proxy_tunnel_run():
        Remove re-init/clear of the pollset for each call so that the function
        is reentrant.
        Handle POLLOUT before POLLIN so that we can read in the same pass once
        all buffered output data are flushed, using ap_filter_input_pending()
        to drain buffered input data.

This is preparatory patch for async websocket tunneling is mod_proxy_http.


Revision 1879000 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 19 17:30:24 2020 UTC (4 years, 10 months ago) by ylavic
File length: 163930 byte(s)
Diff to previous 1878994 (colored)
ap_proxy_define_match_worker: disable connection reuse by default.

To avoid compat issues with dns/connection reuse now that a worker with
dollar substitution can be elected.


Revision 1878994 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 19 15:39:33 2020 UTC (4 years, 10 months ago) by ylavic
File length: 163458 byte(s)
Diff to previous 1878467 (colored)
ap_proxy_define_match_worker: don't copy the url unnecessarily.

And save a few cycles, when the duplication is needed, by not copying
the ignored part.


Revision 1878467 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 4 08:40:10 2020 UTC (4 years, 10 months ago) by jfclere
File length: 163455 byte(s)
Diff to previous 1877728 (colored)
make sure the $n of the regular expressions is not included the name of the worker.
for example,  the example:
ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com:8000$1"
was giving:
AH00526: Syntax error on line nnn of bla/conf/httpd.conf:
ProxyPass Unable to parse URL: http://backend.example.com:8000$1



Revision 1877728 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 14 09:02:13 2020 UTC (4 years, 11 months ago) by ylavic
File length: 163323 byte(s)
Diff to previous 1877646 (colored)
mod_proxy: binary search for ProxyErrorOverride status codes.

The list can be rather long, speed up runtime by sorting the status codes in
error_override_codes and using binary search from ap_proxy_should_override().


Revision 1877646 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 12 12:20:57 2020 UTC (4 years, 11 months ago) by ylavic
File length: 162958 byte(s)
Diff to previous 1876599 (colored)
mod_proxy_http: handle Upgrade requests and upgraded protocol forwarding.

If the request Upgrade header matches the worker upgrade= parameter and
the backend switches the protocol, do the tunneling in mod_proxy_http.
This allows to keep the protocol to HTTP until the backend really
switches the protocol, and apply usual output filters.

When configured to forward Upgrade mechanism, we want the backend to be
able to announce its Upgrade protocol to the client (e.g. with 426
Upgrade Required response) and thus forward back the Upgrade header that
matches the one(s) configured in the worker upgrade= parameter.

modules/proxy/mod_proxy.h:
modules/proxy/proxy_util.c:
    ap_proxy_worker_can_upgrade(): added helper to determine whether a
    proxy worker is configured to forward an Upgrade protocol.

include/ap_mmn.h:
    Bump MMN minor for ap_proxy_worker_can_upgrade().

modules/proxy/mod_proxy.c:
    set_worker_param(): handle worker parameter upgrade=ANY as upgrade=*
    (should the "any" protocol scheme be something some day..).

modules/proxy/mod_proxy_wstunnel.c:
    proxy_wstunnel_handler(): use ap_proxy_worker_can_upgrade() to match
    the Upgrade header. Axe handling of upgrade=NONE, it makes no sense to
    Upgrade a connection if the client did not ask for it, nor to configure
    mod_proxy_wstunnel to use a worker with upgrade=NONE by the way.

modules/proxy/mod_proxy_http.c:
    proxy_http_req_t: add fields force10 (force HTTP/1.0) and upgrade (value
    of the Upgrade header sent by the client if it matches the configuration,
    NULL otherwise).
    proxy_http_handler(): use ap_proxy_worker_can_upgrade() to determine
    whether the request is electable for end to end protocol upgrading and set
    req->upgrade accordingly.
    terminate_headers(): handle Connection and Upgrade headers to send to the
    backend, according to req->force10 and req->upgrade set before.
    ap_proxy_http_prefetch(): use req->force10 and terminate_headers().
    send_continue_body(): added helper to send the body retained for end to
    end 100-continue handling.
    ap_proxy_http_process_response(): use ap_proxy_worker_can_upgrade() to
    match the response Upgrade header and forward it back if it matches the
    configured one(s). That is for 101 Switching Protocol obviously but also
    any other status code which is not overidden, at the backend wish. If the
    protocol is switching, create a proxy tunnel and run it, using the minimal
    timeout from the client or backend connection.

Github: closes #125



Revision 1876599 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 16 12:32:33 2020 UTC (5 years ago) by ylavic
File length: 162489 byte(s)
Diff to previous 1876404 (colored)
Add missing pool tags to help debugging.

Revision 1876404 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 11 21:19:08 2020 UTC (5 years ago) by covener
File length: 162398 byte(s)
Diff to previous 1873985 (colored)
PR63628: individual status codes for ProxyErrorOverride.

Support specifying the http status codes to be considered by ProxyErrorOverride 

Submitted By: Martin Drößler <mail martindroessler.de>
Committed By: covener



Revision 1873985 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 13 18:15:57 2020 UTC (5 years, 2 months ago) by mrumph
File length: 161775 byte(s)
Diff to previous 1870991 (colored)
Fix spelling errors found by codespell.  [skip ci]


Revision 1870991 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 7 15:44:24 2019 UTC (5 years, 4 months ago) by jailletc36
File length: 161776 byte(s)
Diff to previous 1869420 (colored)
Axe an empty line in order to synch with 2.4.x

Revision 1869420 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 5 16:41:14 2019 UTC (5 years, 5 months ago) by ylavic
File length: 161777 byte(s)
Diff to previous 1869338 (colored)
mod_proxy: Improve tunneling loop.

Support half closed connections and pending data draining (for protocols like
rsync). PR 61616.

When reading on one side goes faster than writing on the other side, the output
filters chain may start buffering data and finally block, which will break
bidirectional tunneling for some protocols.

To avoid this, proxy_tunnel_run() now stops polling/reading until pending data
are drained, and recovers appropriately.


Revision 1869338 - (view) (download) (annotate) - [select for diffs]
Modified Sun Nov 3 15:48:53 2019 UTC (5 years, 5 months ago) by ylavic
File length: 155922 byte(s)
Diff to previous 1868296 (colored)
mod_proxy: factorize mod_proxy_{connect,wstunnel} tunneling code in proxy_util.

This commit adds struct proxy_tunnel_rec that contains the fields needed for a
poll() loop through the filters chains, plus functions ap_proxy_tunnel_create()
and ap_proxy_tunnel_run() to respectively initialize a tunnel and (re)start it.
 
Proxy connect and wstunnel modules now make use of this new API to avoid
duplicating logic and code.


Revision 1868296 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 11 15:11:40 2019 UTC (5 years, 6 months ago) by rpluem
File length: 148212 byte(s)
Diff to previous 1868295 (colored)
Fix pool concurrency problems

Create a subpool of the connection pool for worker scoped DNS resolutions.
This is needed to avoid race conditions in using the connection pool by multiple
threads during ramp up.

Recheck after obtaining the lock if we still need to do things or if they
were already done by another thread while we were waiting on the lock.

* modules/proxy/proxy_util.c: Create a subpool of the connection pool for worker
  scoped DNS resolutions and use it.

* modules/proxy/mod_proxy.h: Define AP_VOLATILIZE_T and add dns_pool to
  struct proxy_conn_pool.

* modules/proxy/mod_proxy_ftp.c: Use dns_pool and consider that
  worker->cp->addr is volatile in this location of the code.

PR: 63503


Revision 1868295 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 11 14:40:10 2019 UTC (5 years, 6 months ago) by rpluem
File length: 147044 byte(s)
Diff to previous 1868294 (colored)
* Add back logging goodness

Add back logging goodness added by covener in r1865938.


Revision 1868294 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 11 14:36:32 2019 UTC (5 years, 6 months ago) by rpluem
File length: 147033 byte(s)
Diff to previous 1866145 (colored)
* Revert r1865944 and r1865938

Revert r1865944 and r1865938 in order to provide a better patch with less
locking and thus contention.

lognos


PR63503: fix pool concurrency problems in mod_proxy

reslist and resolver related calls could concurrently access the same pool.

Submitted By: Don Poitras <Don.Poitras sas.com>
Committed By: covener



Revision 1866145 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 30 11:58:41 2019 UTC (5 years, 7 months ago) by covener
File length: 148216 byte(s)
Diff to previous 1865944 (colored)
restore use of global mutex under !APR_HAS_THREADS

followup to r1852442 which appears to have been too agressive in wrapping
blocks with #if APR_HAS_THREADS.  With !APR_HAS_THREADS a global mutex 
is a proc mutex.




Revision 1865944 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 26 15:09:00 2019 UTC (5 years, 7 months ago) by covener
File length: 148243 byte(s)
Diff to previous 1865938 (colored)
lognos



Revision 1865938 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 26 14:19:31 2019 UTC (5 years, 7 months ago) by covener
File length: 148213 byte(s)
Diff to previous 1865937 (colored)
PR63503: fix pool concurrency problems in mod_proxy

reslist and resolver related calls could concurrently access the same pool.

Submitted By: Don Poitras <Don.Poitras sas.com>
Committed By: covener


Revision 1865937 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 26 14:07:08 2019 UTC (5 years, 7 months ago) by covener
File length: 147060 byte(s)
Diff to previous 1864693 (colored)
remove APR_HAS_THREADS check 

no need to wrap these after r1865936


Revision 1864693 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 8 12:03:14 2019 UTC (5 years, 8 months ago) by jorton
File length: 147114 byte(s)
Diff to previous 1864191 (colored)
* modules/proxy/proxy_util.c (ap_proxy_share_balancer): Create the
  nonce as a pseudo-UUID using the PRNG.


Revision 1864191 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 2 01:27:37 2019 UTC (5 years, 8 months ago) by covener
File length: 146978 byte(s)
Diff to previous 1859713 (colored)
remove request details from error documents (CVE-2019-10092).


Revision 1859713 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 22 09:54:05 2019 UTC (5 years, 11 months ago) by rpluem
File length: 147151 byte(s)
Diff to previous 1859422 (colored)
* Fix the logic to follow the comment. So far we only forwarded the header if
  we have NOT used it AND the env variable was set. But if we have not
  used it we should forward it in any case independent of the env variable
  setting.
  This aligns also with the behaviour in ap_proxy_create_hdrbrgd.


Revision 1859422 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 17 08:42:17 2019 UTC (5 years, 11 months ago) by ylavic
File length: 147149 byte(s)
Diff to previous 1856829 (colored)
Follow up to r1859371: extend to other ap_proxy_connection_create[_ex]() users.

This function now now handles SSL reuse as well as the "proxy-request-hostname"
note (SNI), so let's also call it unconditionnaly in all proxy modules.

On the mod_ssl side, since this note has the lifetime of the connection, don't
reset/unset it during handshake (ssl_io_filter_handshake).


Revision 1856829 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 2 15:00:43 2019 UTC (6 years ago) by jim
File length: 146940 byte(s)
Diff to previous 1855646 (colored)
Fix for: [Bug 62372] Load balancer byrequests required when bytraffic chosen



Revision 1855646 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 16 13:45:17 2019 UTC (6 years, 1 month ago) by ylavic
File length: 146864 byte(s)
Diff to previous 1852442 (colored)
mod_proxy/ssl: cleanup per-request SSL configuration for recycled proxy conns.

The SSL dir config of proxy/backend connections is stored in r->per_dir_config
but those connections have a lifetime independent of the requests they handle.

So we need to allow the external ssl_engine_set() function to reset mod_ssl's
dir config in between proxy requests, or the first sslconn->dc could be used
after free for the next requests.

mod_proxy can then reset/reinit the request config when recycling its backend
connections.

PR 63256.


Revision 1852442 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 29 12:28:35 2019 UTC (6 years, 2 months ago) by stsp
File length: 146291 byte(s)
Diff to previous 1837250 (colored)
Make proxy modules compile if APR_HAS_THREADS is not defined.


Revision 1837250 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 1 18:53:53 2018 UTC (6 years, 8 months ago) by jailletc36
File length: 146048 byte(s)
Diff to previous 1836648 (colored)
If ProxyPassReverse is used for reverse mapping of relative redirects, subsequent ProxyPassReverse statements, whether they are relative or absolute, may fail.

PR 60408 [Peter Haworth <pmh1wheel gmail.com>]

Revision 1836648 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 25 16:33:44 2018 UTC (6 years, 8 months ago) by ylavic
File length: 145931 byte(s)
Diff to previous 1836603 (colored)
mod_proxy_http: follow up to r1836588: avoid 100-continue responses from core.

When mod_proxy_http handles end-to-end "100 continue", it can't let
ap_http_filter() send its own interim response whenever the body is read.

So save/restore r->expecting_100 before/after handling the request, and use
req->expecting_100 internally (including to restore r->expecting appropriately).

While at it, add comments and debug logs about 100 continue handling, and
fill in missing APLOGNO()s from r1836588.


Revision 1836603 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 25 06:22:53 2018 UTC (6 years, 8 months ago) by rpluem
File length: 146229 byte(s)
Diff to previous 1836381 (colored)
* ap_proxy_balancer_get_best_worker cannot be exported and used as an optional
  function at the same time. So rename ap_proxy_balancer_get_best_worker to
  proxy_balancer_get_best_worker and make it static which is then used as an
  optional function and recreate ap_proxy_balancer_get_best_worker as an
  exported thin wrapper of proxy_balancer_get_best_worker.


Revision 1836381 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 20 19:27:31 2018 UTC (6 years, 9 months ago) by rpluem
File length: 145552 byte(s)
Diff to previous 1834012 (colored)
* mod_proxy: Remove load order and link dependency between mod_lbmethod_*
  modules and mod_proxy by providing mod_proxy's ap_proxy_balancer_get_best_worker
  as an optional function.

PR: 62557


Revision 1834012 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 21 13:28:51 2018 UTC (6 years, 10 months ago) by jim
File length: 145487 byte(s)
Diff to previous 1832951 (colored)
Add default schema ports for websockets
PR:62480
Lubos Uhliarik <luhliari@redhat.com>


Revision 1832951 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 5 14:47:52 2018 UTC (6 years, 10 months ago) by jorton
File length: 145412 byte(s)
Diff to previous 1832280 (colored)
* modules/proxy/proxy_util.c (ap_proxy_share_worker): Skip creating subpool
  for debugging unless debug-level logging is enabled.  No functional change.


Revision 1832280 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 25 22:27:53 2018 UTC (6 years, 10 months ago) by jailletc36
File length: 145379 byte(s)
Diff to previous 1828890 (colored)
In 'ap_proxy_cookie_reverse_map', iterate over each token of the 'Set-Cookie' header field in order to avoid updating the wrong one.

This could happen if the header field has something like 'fakepath=foo;path=bar". In this case fakepath would be updated instead of path.


We don't need regex anymore in order to parse the field values and 'ap_proxy_strmatch_domain' and 'ap_proxy_strmatch_path' are now useless. (and should be axed IMHO)

PR 61560

Revision 1828890 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 11 12:11:05 2018 UTC (7 years ago) by jhriggs
File length: 145046 byte(s)
Diff to previous 1826313 (colored)
mod_proxy_balancer: Add hot spare member type and corresponding flag (R). Hot spare members are
used as drop-in replacements for unusable workers in the same load balancer set. This differs
from hot standbys which are only used when all workers in a set are unusable. PR 61140.


Revision 1826313 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 9 09:36:18 2018 UTC (7 years, 1 month ago) by ylavic
File length: 140741 byte(s)
Diff to previous 1826289 (colored)
Follow up to r1609680: further simplify/optimize ap_proxy_strcmp_ematch().

While at it, same treatment for its mother ap_strcmp_match().


Revision 1826289 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 8 23:23:30 2018 UTC (7 years, 1 month ago) by ylavic
File length: 140787 byte(s)
Diff to previous 1824482 (colored)
Follow up to r1609680: simpler/faster ap_proxy_strcmp_ematch().

No functional change.


Revision 1824482 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 16 13:52:47 2018 UTC (7 years, 2 months ago) by minfrin
File length: 140781 byte(s)
Diff to previous 1824460 (colored)
Set the notice when hostname is too long for legacy proxy modules to info level.


Revision 1824460 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 16 12:55:49 2018 UTC (7 years, 2 months ago) by minfrin
File length: 140783 byte(s)
Diff to previous 1824176 (colored)
Tone down the message that worker hostname is too long noting it only
affects legacy modules not yet using hostname_ex.


Revision 1824176 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 13 21:22:05 2018 UTC (7 years, 2 months ago) by minfrin
File length: 140711 byte(s)
Diff to previous 1823482 (colored)
mod_proxy: Provide an RFC1035 compliant version of the hostname in the
proxy_worker_shared structure. PR62085


Revision 1823482 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 7 15:38:23 2018 UTC (7 years, 2 months ago) by jim
File length: 140496 byte(s)
Diff to previous 1822883 (colored)
too-long worker schemes and/or hostnames are no longer fatal errors

Revision 1822883 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 1 15:41:49 2018 UTC (7 years, 2 months ago) by ylavic
File length: 140298 byte(s)
Diff to previous 1822879 (colored)
mod_proxy: follow up to r1822849 and r1822879.

Fix my maths, thanks Stefan and Rüdiger!



Revision 1822879 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 1 15:01:40 2018 UTC (7 years, 2 months ago) by ylavic
File length: 140150 byte(s)
Diff to previous 1822878 (colored)
mod_proxy: follow up to r1822849 and r1822878.

Does r1822878's "static" APR_RETRIEVE_OPTIONAL_FN work if, say, mod_proxy is
builtin but mod_http2 isn't?

Not worth taking the risk here since it's not a fast path...

Note: if this is an issue, I'm afraid it applies elsewhere too.



Revision 1822878 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 1 14:42:07 2018 UTC (7 years, 2 months ago) by ylavic
File length: 140336 byte(s)
Diff to previous 1822858 (colored)
mod_proxy: follow up to r1822849.

Get the help(er) of mod_http2 to determine how much connections should
be handled in the reslist by default (i.e. max_threads).



Revision 1822858 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 1 08:34:59 2018 UTC (7 years, 2 months ago) by rpluem
File length: 139702 byte(s)
Diff to previous 1822849 (colored)
* Add some some comment why we do not limit hmax any longer

Revision 1822849 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 1 07:34:02 2018 UTC (7 years, 2 months ago) by rpluem
File length: 139447 byte(s)
Diff to previous 1822531 (colored)
* When mod_http2 is loaded more then ThreadsPerChild backend connections can
  be useful as mod_http2 has an additional thread pool on top of
  ThreadsPerChild.
  But leave the default with ThreadsPerChild.


Revision 1822531 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 29 16:41:03 2018 UTC (7 years, 2 months ago) by ylavic
File length: 139539 byte(s)
Diff to previous 1818726 (colored)
mod_proxy: fix proxy connection cleanup from an n+2 pool.

When connection_destructor() is called after pchild is gone, we can't
dereference worker->cp anymore. This happens is debug/one_process mode only,
if we exit by calling apr_terminate() or clearing the process pool directly.

Fix this by NULL-ing worker->cp in conn_pool_cleanup(), and by registering it
as a pre_cleanup.



Revision 1818726 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 19 22:46:27 2017 UTC (7 years, 4 months ago) by ylavic
File length: 139852 byte(s)
Diff to previous 1805188 (colored)
mod_proxy: allow SSLProxyCheckPeer* usage for all proxy modules.

PR 61857.

Proposed by: Markus Gausling <markusgausling googlemail.com>
Reviewed by: ylavic



Revision 1805188 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 16 12:57:41 2017 UTC (7 years, 8 months ago) by jim
File length: 139522 byte(s)
Diff to previous 1775775 (colored)
loadfactor now decimal

Revision 1775775 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 22 23:30:05 2016 UTC (8 years, 3 months ago) by ylavic
File length: 139520 byte(s)
Diff to previous 1756531 (colored)
mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
backend connection, happening with LogLevel trace2 or higher configured,
or at any log level with compilers not detected as C99 compliant (e.g.
MSVC on Windows).



Revision 1756531 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 16 16:21:13 2016 UTC (8 years, 8 months ago) by ylavic
File length: 139405 byte(s)
Diff to previous 1756186 (colored)
Follow up to r1750392: reduce AH03408 level to INFO as suggested by wrowe/jim.

Revision 1756186 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 12 13:58:10 2016 UTC (8 years, 8 months ago) by ylavic
File length: 139408 byte(s)
Diff to previous 1756065 (colored)
[mod_proxy_]http: follow up to r1750392.

Export [ap_]check_pipeline() and use it also for ap_proxy_check_connection(),
so that all the necessary checks on the connection are done before reusing it.



Revision 1756065 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 11 23:37:45 2016 UTC (8 years, 8 months ago) by ylavic
File length: 138486 byte(s)
Diff to previous 1756060 (colored)
Revert r1756064 and r1756060 until fixed (tests framework passes).

Revision 1756060 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 11 22:32:42 2016 UTC (8 years, 8 months ago) by ylavic
File length: 138285 byte(s)
Diff to previous 1756038 (colored)
[mod_proxy_]http: follow up to r1750392.
Export [ap_]check_pipeline() and use it also for ap_proxy_check_connection().

[Reverted by r1756065]


Revision 1756038 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 11 19:50:02 2016 UTC (8 years, 8 months ago) by rjung
File length: 138486 byte(s)
Diff to previous 1750508 (colored)
Fix spelling in comments and text files.
No functional change.
PR 59990


Revision 1750508 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 28 13:48:44 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138483 byte(s)
Diff to previous 1750474 (colored)
mod_proxy: follow up to r1750392 and r1750474.
Restore PROXY_WORKER_IS_USABLE() check in ap_proxy_connect_backend(), we must
obviously (un)put backend in error state based on the result of the actual
connect(), and don't change it in ap_proxy_check_backend()...
APR_SUCCESS return by ap_proxy_check_backend(), i.e. a usable worker and an
established connection, is enough for modules to continue w/o calling
ap_proxy_connect_backend(), still.



Revision 1750474 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 28 11:19:36 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138123 byte(s)
Diff to previous 1750416 (colored)
mod_proxy: follow up to r1750392.
Avoid double checking the connection in ap_proxy_connect_backend() when
ap_proxy_check_backend() says it is up and good to go.

This can be done by moving the PROXY_WORKER_IS_USABLE() check in
ap_proxy_check_backend(), since it is called by ap_proxy_connect_backend(),
and not calling the latter if the former succeeded (for the modules using it).


Revision 1750416 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 21:49:15 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138132 byte(s)
Diff to previous 1750412 (colored)
mod_proxy: we don't need ap_proxy_ssl_connection_cleanup() anymore with
ap_proxy_check_backend() used at connection reuse time, so remove its last call and deprecate it.

Revision 1750412 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 21:39:53 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138115 byte(s)
Diff to previous 1750392 (colored)
mod_proxy: use proxy_conn_rec->tmp_bb where appopriate to avoid temporary
brigade create/destroy.

Revision 1750392 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 17:26:12 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138197 byte(s)
Diff to previous 1750376 (colored)
mod_proxy_{http,ajp,fcgi}}: don't reuse backend connections with data available
before the request is sent.  PR 57832.

ap_proxy_check_backend() can be used before ap_proxy_connect_backend() to try
to read available data (including from the filters), and is called by
ap_proxy_connect_backend() to check the socket state only (as before, still
relevant after ap_proxy_check_backend() due to filter data which may not have
triggered a real socket operation).


Revision 1750376 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 16:06:42 2016 UTC (8 years, 9 months ago) by ylavic
File length: 136731 byte(s)
Diff to previous 1750311 (colored)
mod_proxy: revert r1750301, r1750305 and r1750311.
Rework needed.

Revision 1750311 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 08:20:39 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138120 byte(s)
Diff to previous 1750305 (colored)
mod_proxy: follow up to r1750301: APLOGNO().

[Reverted by r1750376]


Revision 1750305 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 08:08:26 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138115 byte(s)
Diff to previous 1750301 (colored)
mod_proxy: follow up to r1750301.
s/is_socket_connected/get_socket_connected/ in the !USE_ALTERNATE_IS_CONNECTED
case, and add CHANGE + MMN entries.

[Reverted by r1750376]


Revision 1750301 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 27 08:00:30 2016 UTC (8 years, 9 months ago) by ylavic
File length: 138115 byte(s)
Diff to previous 1747807 (colored)
mod_proxy: don't reuse backend connections with data available before the
request is sent.  PR 57832.

[Reverted by r1750376]


Revision 1747807 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 10 22:12:55 2016 UTC (8 years, 10 months ago) by jailletc36
File length: 136731 byte(s)
Diff to previous 1747469 (colored)
When  ap_proxy_show_hcmethod has been backported in 2.4.x (r1744951) the function has not been placed at the same position in the code (see r1725306).

Move it at the same place in oder to synch 2.4.x and trunk.

Revision 1747469 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 9 00:06:42 2016 UTC (8 years, 10 months ago) by wrowe
File length: 136731 byte(s)
Diff to previous 1740928 (colored)
Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen

Revision 1740928 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 00:04:57 2016 UTC (8 years, 11 months ago) by ylavic
File length: 136695 byte(s)
Diff to previous 1733239 (colored)
mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,
allowing per backend TLS configuration.



Revision 1733239 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 2 09:51:05 2016 UTC (9 years, 1 month ago) by icing
File length: 135991 byte(s)
Diff to previous 1733056 (colored)
adding default port numbers for h2/h2x proxy schemes, by jchampion

Revision 1733056 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 1 12:35:01 2016 UTC (9 years, 1 month ago) by ylavic
File length: 135916 byte(s)
Diff to previous 1733055 (colored)
mod_proxy: follow up to r1729826 + r1729847 + r1732986.
Don't use magic constants.

Revision 1733055 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 1 12:33:50 2016 UTC (9 years, 1 month ago) by ylavic
File length: 135933 byte(s)
Diff to previous 1733054 (colored)
Revert r1733054: spurious commit of being-worked mod_reqtimeout changes.

Revision 1733054 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 1 12:31:40 2016 UTC (9 years, 1 month ago) by ylavic
File length: 135916 byte(s)
Diff to previous 1732986 (colored)
mod_proxy: follow up to r1729826 + r1729847 + r1732986.
Don't use magic constants.

Reverted by r1733055, re-commited without spurious changes in r1733056.

Revision 1732986 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 1 01:20:06 2016 UTC (9 years, 1 month ago) by ylavic
File length: 135933 byte(s)
Diff to previous 1732954 (colored)
mod_proxy: follow up to r1729826 + r1729847.
Adjust stacked ssl_hostname maximum size.

Revision 1732954 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 29 21:54:23 2016 UTC (9 years, 1 month ago) by ylavic
File length: 135916 byte(s)
Diff to previous 1729847 (colored)
mod_proxy: add missing APLOGNO()s.

Revision 1729847 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 11 14:57:04 2016 UTC (9 years, 2 months ago) by ylavic
File length: 135901 byte(s)
Diff to previous 1729826 (colored)
mod_proxy: follow up to r1729826: really copy conn->ssl_hostname.

Revision 1729826 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 11 13:46:39 2016 UTC (9 years, 2 months ago) by ylavic
File length: 135647 byte(s)
Diff to previous 1729208 (colored)
mod_proxy: Play/restore the TLS-SNI on new backend connections which
had to be issued because the remote closed the previous/reusable one
during idle (keep-alive) time.


Revision 1729208 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 8 16:50:07 2016 UTC (9 years, 2 months ago) by icing
File length: 135443 byte(s)
Diff to previous 1728650 (colored)
let proxy handler forward ALPN protocol strings for ssl proxy connections

Revision 1728650 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 5 12:12:14 2016 UTC (9 years, 2 months ago) by rjung
File length: 135296 byte(s)
Diff to previous 1728478 (colored)
Provide dummy impl of ap_proxy_connect_uds()
in case when APR_HAVE_SYS_UN_H is not defined.
Just returns APR_ENOTIMPL.

This helps symbol export/import handling on
Netware and also seems to be more correct,
because mod_proxy.h contains ap_proxy_connect_uds()
unconditionally.


Revision 1728478 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 4 13:41:19 2016 UTC (9 years, 2 months ago) by rpluem
File length: 135265 byte(s)
Diff to previous 1728304 (colored)
* Introduce ap_proxy_transfer_between_connections

Revision 1728304 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 3 12:52:29 2016 UTC (9 years, 2 months ago) by jim
File length: 131855 byte(s)
Diff to previous 1728148 (colored)
STOPPED workers are never retried... Disabled can be.

Revision 1728148 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 2 15:21:38 2016 UTC (9 years, 2 months ago) by jim
File length: 131557 byte(s)
Diff to previous 1726781 (colored)
Since these are externs, prepend proxy_

Revision 1726781 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 26 12:19:50 2016 UTC (9 years, 2 months ago) by rpluem
File length: 132523 byte(s)
Diff to previous 1726779 (colored)
* Fill missing log number

Revision 1726779 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 26 12:13:56 2016 UTC (9 years, 2 months ago) by rpluem
File length: 132518 byte(s)
Diff to previous 1725485 (colored)
* Introduce ap_proxy_buckets_lifetime_transform as a replacement for
  proxy_buckets_lifetime_transform in mod_proxy_http. Another future consumer
  of this will be mod_proxy_wstunnel.


Revision 1725485 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 19 12:02:41 2016 UTC (9 years, 3 months ago) by rjung
File length: 131123 byte(s)
Diff to previous 1725306 (colored)
Added many log numbers to log statements that
had none.

Those were not detected by the coccinelle script.


Revision 1725306 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 18 16:54:06 2016 UTC (9 years, 3 months ago) by jim
File length: 131108 byte(s)
Diff to previous 1725120 (colored)
Expose this in our API

Revision 1725120 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 17 20:12:09 2016 UTC (9 years, 3 months ago) by jim
File length: 130876 byte(s)
Diff to previous 1724882 (colored)
Make balancer manager health-check aware

Revision 1724882 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 15 21:43:55 2016 UTC (9 years, 3 months ago) by jim
File length: 130749 byte(s)
Diff to previous 1724879 (colored)
Oops :)


Revision 1724879 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 15 21:37:23 2016 UTC (9 years, 3 months ago) by jim
File length: 130918 byte(s)
Diff to previous 1722195 (colored)
1st cut of 'simple' tcp check... We reuse various proxy
function and so this *could* be more streamlined, but
use this to show how the other would work, since we need
brigades, SSL/TLS support, etc.

Revision 1722195 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 29 17:42:19 2015 UTC (9 years, 3 months ago) by jim
File length: 130698 byte(s)
Diff to previous 1721759 (colored)
Make aware of new status: Failed Health Check.
Store the number of current passes/fails in shm

Revision 1721759 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 26 21:29:21 2015 UTC (9 years, 3 months ago) by jim
File length: 130502 byte(s)
Diff to previous 1715876 (colored)
Abstract out as macro

Revision 1715876 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 23 16:46:01 2015 UTC (9 years, 4 months ago) by ylavic
File length: 130699 byte(s)
Diff to previous 1715869 (colored)
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).


Revision 1715869 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 23 16:28:36 2015 UTC (9 years, 4 months ago) by ylavic
File length: 130645 byte(s)
Diff to previous 1715789 (colored)
Revert r1715789: will re-commit without spurious functional changes.


Revision 1715789 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 23 12:33:09 2015 UTC (9 years, 4 months ago) by ylavic
File length: 130699 byte(s)
Diff to previous 1703902 (colored)
Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).

[Reverted by r1715869]


Revision 1703902 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 18 16:43:25 2015 UTC (9 years, 7 months ago) by ylavic
File length: 130645 byte(s)
Diff to previous 1703807 (colored)
mod_proxy: Fix ProxySourceAddress binding failure with AH00938.  PR 56687.
Proposed by: Arne de Bruijn <apache arbruijn.dds.nl>
Reviewed by: ylavic


Revision 1703807 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 18 10:58:58 2015 UTC (9 years, 7 months ago) by ylavic
File length: 130307 byte(s)
Diff to previous 1697323 (colored)
mod_proxy: don't recyle backend announced "Connection: close" connections.
Failing to do this may lead to a race condition where we send a new request
before the backend really closes the connection (or lost SSL-Alert/FIN make
us think the connection is still alive, until the retransmission).


Revision 1697323 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 24 07:43:19 2015 UTC (9 years, 7 months ago) by rpluem
File length: 130201 byte(s)
Diff to previous 1687783 (colored)
* Do a more complete cleanup here. At this point we cannot end up with something useful with the data we created so far.

Revision 1687783 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 26 15:10:29 2015 UTC (9 years, 9 months ago) by ylavic
File length: 130241 byte(s)
Diff to previous 1682819 (colored)
mod_proxy: follow up to r1678768.
The resource is not dereferenceable if connection_destructor()
is called from reslist_destroy().


Revision 1682819 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 1 05:45:13 2015 UTC (9 years, 10 months ago) by jailletc36
File length: 130226 byte(s)
Diff to previous 1678768 (colored)
Improve error message (related to PR57311 diagnostic)

Revision 1678768 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 11 15:26:13 2015 UTC (9 years, 11 months ago) by ylavic
File length: 130199 byte(s)
Diff to previous 1678763 (colored)
mod_proxy: check for the correct pool (lifetime) in connection_cleanup(),
according to the associated comment and the value really NULLed in
conn_pool_cleanup().


Revision 1678763 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 11 14:53:34 2015 UTC (9 years, 11 months ago) by ylavic
File length: 130193 byte(s)
Diff to previous 1665215 (colored)
mod_proxy: only cleanup the socket for a connection asked to be closed but
whose address can still be reused.

This saves unnecessary socket pool destroy and creation at cleanup and reuse
time, plus the same initialization of conn->pool's associated data which can
be reused in that case.


Revision 1665215 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 9 12:45:56 2015 UTC (10 years, 1 month ago) by ylavic
File length: 130077 byte(s)
Diff to previous 1664709 (colored)
mod_proxy: use the original (non absolute) form of the request-line's URI
for requests embedded in CONNECT payloads used to connect SSL backends via
a ProxyRemote forward-proxy. PR 55892.

Submitted by: Hendrik Harms <hendrik.harms gmail com>
Reviewed  by: wrowe, ylavic
Committed by: ylavic


Revision 1664709 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 6 19:31:42 2015 UTC (10 years, 1 month ago) by rpluem
File length: 129815 byte(s)
Diff to previous 1656259 (colored)
 * Do not reset the retry timeout if the worker is in error at this stage even
   if the connection to the backend was successful. It was likely set into
   error by a different thread / process in parallel e.g. for a timeout or
   bad status. We should respect this and should not continue with a connection
   via this worker even if we got one.


Revision 1656259 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 1 00:05:59 2015 UTC (10 years, 2 months ago) by ylavic
File length: 129242 byte(s)
Diff to previous 1650028 (colored)
mod_proxy_http: don't connect or reuse backend before prefetching request body.

The goal is to minimize the delay between this connection is considered alive
and the first bytes sent (should the client's link be slow or some input filter
retain the data).
This is a best effort to prevent the backend from closing (from under us) what
it thinks is an idle connection, hence to reduce to the minimum the unavoidable
local ap_proxy_is_socket_connected() vs remote keepalive race condition.
PR 56541.

Also, allow the new subprocess_env variable "proxy-flushall" to prevent any
buffering of the request body before it is forwarded to the backend.
When set, the prefetch is still done (although non-blocking), so we can still
determine Content-Length vs chunked vs spooled (depending on data available
with the header or while reading it), and then all brigades are flushed when
passed to the backend.
PR 37920.



Revision 1650028 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 7 10:36:12 2015 UTC (10 years, 3 months ago) by ylavic
File length: 129206 byte(s)
Diff to previous 1648433 (colored)
mod_proxy: Don't put non balancer-member workers in error state by
default for connection or 500/503 errors, and honor status=+I for
any error.  PR 48388.


Revision 1648433 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 29 21:05:56 2014 UTC (10 years, 3 months ago) by covener
File length: 129060 byte(s)
Diff to previous 1647009 (colored)
PR 56603:  Inappropiate ProxyPassReverse match when interpolated URL 
is empty string 

Submitted By: <ajprout hotmail.com>
Committed By: covener



Revision 1647009 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 20 15:56:16 2014 UTC (10 years, 4 months ago) by covener
File length: 129050 byte(s)
Diff to previous 1644503 (colored)
Allow SetHandler+UDS+fcgi to take advantage of dedicated workers including
opting in to connection reuse and other proxy options (max=, etc).

adds 'enablereuse' proxyoption and a minor MMN bump to share
proxy_desocketfy outside of mod_proxy.c, which is required to
match workers to URLs.



Revision 1644503 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 10 18:45:24 2014 UTC (10 years, 4 months ago) by ylavic
File length: 129217 byte(s)
Diff to previous 1641636 (colored)
mod_proxy: don't add the default port to the name of proxy workers. PR 57259.
ap_proxy_port_of_scheme() knows more default ports than apr_unparse_uri().


Revision 1641636 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 25 15:38:10 2014 UTC (10 years, 4 months ago) by covener
File length: 128534 byte(s)
Diff to previous 1641381 (colored)
elaborate on a TRACE2 message about using the default reverse
proxy worker. 


Revision 1641381 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 24 12:36:32 2014 UTC (10 years, 4 months ago) by covener
File length: 128511 byte(s)
Diff to previous 1634425 (colored)
Return a match whenever we get to the end of the worker name, regardless
of whether there is URL left.

ProxyPassMatch had been using the default worker in trunk.


Revision 1634425 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 27 00:55:20 2014 UTC (10 years, 5 months ago) by covener
File length: 128452 byte(s)
Diff to previous 1634120 (colored)
When using EBCDIC encoding, HTTPS through ProxyPass and ProxyRemote doesn't
work correctly. PR 57092

Submitted By: Edward Lu 
Committed By: covener



Revision 1634120 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 24 19:00:10 2014 UTC (10 years, 5 months ago) by rpluem
File length: 128333 byte(s)
Diff to previous 1625952 (colored)
* Use the correct server name for SNI in case the backend SSL connection itself
  is established via a proxy server.

PR: 57139
Submitted by: Szabolcs Gyurko <szabolcs gyurko.org>


Revision 1625952 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 18 12:10:54 2014 UTC (10 years, 7 months ago) by jim
File length: 128144 byte(s)
Diff to previous 1621419 (colored)
oops... prepend 0


Revision 1621419 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 30 06:51:11 2014 UTC (10 years, 7 months ago) by jailletc36
File length: 128143 byte(s)
Diff to previous 1621372 (colored)
Fix sscanf format spotted by cppcheck.
Improve alignment.
Untested.

Revision 1621372 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 29 19:42:34 2014 UTC (10 years, 7 months ago) by jim
File length: 128131 byte(s)
Diff to previous 1621367 (colored)
Correct loglevel.


Revision 1621367 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 29 19:17:45 2014 UTC (10 years, 7 months ago) by jim
File length: 128133 byte(s)
Diff to previous 1619455 (colored)
PR53218
Allow for longer worker names and make truncation a non-fatal
error... 


Revision 1619455 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 21 15:49:54 2014 UTC (10 years, 8 months ago) by ylavic
File length: 128037 byte(s)
Diff to previous 1610674 (colored)
mod_proxy: add missing APLOGNOs.


Revision 1610674 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 15 12:27:00 2014 UTC (10 years, 9 months ago) by jorton
File length: 128027 byte(s)
Diff to previous 1609680 (colored)
SECURITY (CVE-2014-0117): Fix a crash in mod_proxy.  In a reverse
proxy configuration, a remote attacker could send a carefully crafted
request which could crash a server process, resulting in denial of
service.

Thanks to Marek Kroemeke working with HP's Zero Day Initiative for
reporting this issue.

* server/util.c (ap_parse_token_list_strict): New function.

* modules/proxy/proxy_util.c (find_conn_headers): Use it here.

* modules/proxy/mod_proxy_http.c (ap_proxy_http_process_response):
  Send a 400 for a malformed Connection header.

Submitted by: Edward Lu, breser, covener


Revision 1609680 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 11 10:36:15 2014 UTC (10 years, 9 months ago) by jkaluza
File length: 127949 byte(s)
Diff to previous 1609101 (colored)
mod_proxy: add ap_proxy_define_match_worker() and use it for ProxyPassMatch
and ProxyMatch section to distinguish between normal workers and workers
with regex substitutions in the name. Implement handling of such workers
in ap_proxy_get_worker(). PR 43513


Revision 1609101 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 9 11:11:23 2014 UTC (10 years, 9 months ago) by ylavic
File length: 125612 byte(s)
Diff to previous 1602989 (colored)
Fix C99 (or later only) comment.

Revision 1602989 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 16 20:26:24 2014 UTC (10 years, 10 months ago) by ylavic
File length: 125609 byte(s)
Diff to previous 1602697 (colored)
mod_proxy: Don't limit the size of the connectable Unix Domain Socket paths.
Since connect() to UDS path is used at several places, introduce
ap_proxy_connect_uds() in proxy_util.


Revision 1602697 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 15 13:54:55 2014 UTC (10 years, 10 months ago) by jim
File length: 125456 byte(s)
Diff to previous 1602523 (colored)
revert 1602523, until there is understanding
about what the actual issue and "requirement" are.


Revision 1602523 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 13 21:10:51 2014 UTC (10 years, 10 months ago) by jim
File length: 125581 byte(s)
Diff to previous 1601630 (colored)
Allow for "magic" scheme "auto" which makes the scheme of
the backend worker match whatever the scheme of the
incoming request was...

For example:

   ProxyPass / auto://foo.example.com/

If the incoming request is http:.../lala then
the resultant will be http://foo.example.com/lala

If it's wws:.../lolo then we'd send
wws://foo.example.com/lolo

Revision 1601630 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 10 13:23:20 2014 UTC (10 years, 10 months ago) by ylavic
File length: 125456 byte(s)
Diff to previous 1601291 (colored)
mod_proxy: follow up to r1601291.

Since deferred_write_pool is needed by the core_output_filter and is a subpool
of the connection, shutdown in a pre_cleanup of the connection's pool to avoid
a freed memory access (SEGV).

Reported By: takashi


Revision 1601291 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 9 01:03:39 2014 UTC (10 years, 10 months ago) by ylavic
File length: 125505 byte(s)
Diff to previous 1601290 (colored)
mod_proxy: Shutdown (eg. SSL close notify) the backend connection
before closing.


Revision 1601290 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 9 00:59:04 2014 UTC (10 years, 10 months ago) by ylavic
File length: 124509 byte(s)
Diff to previous 1601285 (colored)
Revert r1601285 and r1601283.
Shouldn't have commited the latter without disussing it on dev@.
Since the former creates upper APLOGNOs, revert and then recommit with the reverted next tag number.


Revision 1601285 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 9 00:23:16 2014 UTC (10 years, 10 months ago) by ylavic
File length: 125505 byte(s)
Diff to previous 1592615 (colored)
mod_proxy: Shutdown (eg. close notify) the backend connection before closing.


Revision 1592615 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 5 19:26:33 2014 UTC (10 years, 11 months ago) by trawick
File length: 124509 byte(s)
Diff to previous 1592529 (colored)
Follow-up to r1592529:

Define default port for "scgi" schemes (as chosen by
mod_proxy_scgi) in a common location.

Suggested by: jailletc36


Revision 1592529 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 5 14:02:48 2014 UTC (10 years, 11 months ago) by trawick
File length: 124482 byte(s)
Diff to previous 1592514 (colored)
mod_proxy_scgi: Support Unix sockets.

ap_proxy_port_of_scheme(): Support default SCGI port (4000).


Revision 1592514 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 5 12:47:18 2014 UTC (10 years, 11 months ago) by trawick
File length: 124458 byte(s)
Diff to previous 1592511 (colored)
Clarify an existing requirement of the server_portstr parameter
to ap_proxy_determine_connection(): it must be a buffer of at
least one byte in size.

(And don't bother with using strcpy in order to zap a string.)


Revision 1592511 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 5 12:40:47 2014 UTC (10 years, 11 months ago) by trawick
File length: 124413 byte(s)
Diff to previous 1588544 (colored)
reformat only (get rid of unnecessary block scope)

Revision 1588544 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 18 19:21:35 2014 UTC (11 years ago) by jim
File length: 124456 byte(s)
Diff to previous 1588527 (colored)
strncmp(r->filename, "proxy:", 6) is faster than a
note. Plus, allows for checking even if not due to
rewrite.


Revision 1588527 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 18 17:38:15 2014 UTC (11 years ago) by ylavic
File length: 124625 byte(s)
Diff to previous 1588519 (colored)
mod_proxy: Preserve original request headers even if they differ
           from the ones to be forwarded to the backend. PR 45387.


Revision 1588519 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 18 17:17:06 2014 UTC (11 years ago) by ylavic
File length: 124338 byte(s)
Diff to previous 1573229 (colored)
mod_proxy: When ping/pong is configured for a worker, don't send or forward
           "100 Continue" (interim) response to the client if it does not
           expect one.


Revision 1573229 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 1 21:36:27 2014 UTC (11 years, 1 month ago) by ylavic
File length: 123761 byte(s)
Diff to previous 1572967 (colored)
mod_proxy: Add comment and avoid ternary operator as condition (no functional change).

Revision 1572967 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 28 14:46:50 2014 UTC (11 years, 1 month ago) by ylavic
File length: 123584 byte(s)
Diff to previous 1572630 (colored)
mod_proxy: follows up r1572630.
Don't reuse a SSL backend connection with no SNI for a request requiring SNI.


Revision 1572630 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 27 15:40:01 2014 UTC (11 years, 1 month ago) by ylavic
File length: 123514 byte(s)
Diff to previous 1572627 (colored)
Redo what was reverted in r1572627.
Don't reuse a SSL backend connection whose SNI differs. PR 55782.
This may happen when ProxyPreserveHost is on and the proxy-worker
handles connections to different Hosts.


Revision 1572627 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 27 15:31:58 2014 UTC (11 years, 1 month ago) by ylavic
File length: 122443 byte(s)
Diff to previous 1572606 (colored)
Revert r1572606 for the time being since backport would conflict with 2.4.x's proxy_conn_rec.
The uds_path field is at the end of the struct in 2.4.x but not in trunk.
Fix that first, then recommit.


Revision 1572606 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 27 14:52:12 2014 UTC (11 years, 1 month ago) by ylavic
File length: 123514 byte(s)
Diff to previous 1572561 (colored)
Don't reuse a SSL backend connection whose SNI differs. PR 55782.
This may happen when ProxyPreserveHost is on and the proxy-worker
handles connections to different Hosts.


Revision 1572561 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 27 13:39:25 2014 UTC (11 years, 1 month ago) by ylavic
File length: 122443 byte(s)
Diff to previous 1572543 (colored)
Avoid useless functions calls.


Revision 1572543 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 27 13:05:24 2014 UTC (11 years, 1 month ago) by ylavic
File length: 122414 byte(s)
Diff to previous 1564437 (colored)
Cleanup the client to backend brigade before returning an error (if any) to avoid buckets lifetime issues (backend connection's pool destroyed before request's one). PR 50335.
Suggested by rpluem.


Revision 1564437 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 4 19:36:50 2014 UTC (11 years, 2 months ago) by rpluem
File length: 122307 byte(s)
Diff to previous 1561660 (colored)
* Do not parse URL in case of regular expression as they likely do not follow
  the URL syntax.

PR: 56074


Revision 1561660 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 27 13:09:11 2014 UTC (11 years, 2 months ago) by jim
File length: 122264 byte(s)
Diff to previous 1561137 (colored)
r->filename should maintain the proxy: prefix for PHP-FPM

Revision 1561137 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 24 20:01:47 2014 UTC (11 years, 2 months ago) by jim
File length: 122055 byte(s)
Diff to previous 1560979 (colored)
handle leak. thx to Y^2

Revision 1560979 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 24 13:06:40 2014 UTC (11 years, 2 months ago) by jim
File length: 122133 byte(s)
Diff to previous 1560689 (colored)
Reflow logic... pull UDS stuff out

Revision 1560689 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 23 14:09:40 2014 UTC (11 years, 2 months ago) by jim
File length: 121898 byte(s)
Diff to previous 1560546 (colored)
Tuck away UDS path in request-rec, since worker isn't
thread-safe. Protect from NULL refs.

Revision 1560546 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 22 22:26:49 2014 UTC (11 years, 2 months ago) by jim
File length: 121749 byte(s)
Diff to previous 1560367 (colored)
Adjust url as required, following what we did to r->filename.
Save some cycles when searching...

Revision 1560367 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 22 14:54:21 2014 UTC (11 years, 2 months ago) by jim
File length: 121372 byte(s)
Diff to previous 1543174 (colored)
make mod_rewrite and mod_proxy UDS work together...

Revision 1543174 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 18 21:37:05 2013 UTC (11 years, 5 months ago) by jim
File length: 120049 byte(s)
Diff to previous 1542562 (colored)
Correct logic... if this is a UDS socket, then bypass all
this.

Revision 1542562 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 16 20:13:48 2013 UTC (11 years, 5 months ago) by jim
File length: 120036 byte(s)
Diff to previous 1540052 (colored)
We were not being consistent between http and others
if we added the default port or not during the canonizing
phase... Baseline the http method (don't add unless the
port provided isn't the default).

Revision 1540052 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 8 14:30:12 2013 UTC (11 years, 5 months ago) by jim
File length: 119203 byte(s)
Diff to previous 1533444 (colored)
UDS urls need to be desockified when configuring...

Revision 1533444 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 18 13:30:52 2013 UTC (11 years, 6 months ago) by rpluem
File length: 119159 byte(s)
Diff to previous 1533440 (colored)
* Fix logical flaw introduced in r1531340. We checked for the opposite.

Revision 1533440 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 18 13:10:45 2013 UTC (11 years, 6 months ago) by jim
File length: 119145 byte(s)
Diff to previous 1533272 (colored)
Rüdiger and Yann suggestions

Revision 1533272 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 22:04:31 2013 UTC (11 years, 6 months ago) by jim
File length: 119252 byte(s)
Diff to previous 1533170 (colored)
another suggestion by Yann... use a shorter lifetime pool

Revision 1533170 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 17:21:37 2013 UTC (11 years, 6 months ago) by jim
File length: 119173 byte(s)
Diff to previous 1533169 (colored)
typo

Revision 1533169 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 17:21:04 2013 UTC (11 years, 6 months ago) by jim
File length: 119172 byte(s)
Diff to previous 1533153 (colored)
from an idea by Yann Ylavic <ylavic.dev@gmail.com>

Revision 1533153 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 16:52:04 2013 UTC (11 years, 6 months ago) by jim
File length: 119177 byte(s)
Diff to previous 1533113 (colored)
move pool creation to the single instance when we need it...
but be pool aware anyway, just in case.

Revision 1533113 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 15:24:44 2013 UTC (11 years, 6 months ago) by jim
File length: 119251 byte(s)
Diff to previous 1533100 (colored)
Only assume localhost in the special case where the person
just has the lone scheme after the |

Revision 1533100 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 15:02:04 2013 UTC (11 years, 6 months ago) by jim
File length: 119225 byte(s)
Diff to previous 1533087 (colored)
ap_proxy_strncpy should correctly handle src being NULL.
Actually, apr_cpystrn() should as well...

Revision 1533087 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 17 14:10:43 2013 UTC (11 years, 6 months ago) by jim
File length: 119079 byte(s)
Diff to previous 1532507 (colored)
Put the uds path in its own field, and adjust the logic
to look for an empty string rather than a flag.

Revision 1532507 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 15 20:02:30 2013 UTC (11 years, 6 months ago) by jim
File length: 119123 byte(s)
Diff to previous 1532456 (colored)
don't use what could have been freed...


Revision 1532456 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 15 17:45:47 2013 UTC (11 years, 6 months ago) by jim
File length: 119124 byte(s)
Diff to previous 1532394 (colored)
Update LOGNO


Revision 1532394 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 15 15:38:09 2013 UTC (11 years, 6 months ago) by jim
File length: 119114 byte(s)
Diff to previous 1531971 (colored)
Standardize on:

   unix:/path/to/socket|scheme://ignored

for ProxyPass UDS.

Revision 1531971 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 14 16:38:52 2013 UTC (11 years, 6 months ago) by jim
File length: 118982 byte(s)
Diff to previous 1531969 (colored)
check that we have a pool...


Revision 1531969 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 14 16:31:17 2013 UTC (11 years, 6 months ago) by jim
File length: 118836 byte(s)
Diff to previous 1531962 (colored)
Just use the def global... consistency is important


Revision 1531962 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 14 16:12:30 2013 UTC (11 years, 6 months ago) by jim
File length: 118861 byte(s)
Diff to previous 1531929 (colored)
Ensure that userland format of UDS is the same as how it is
configured, no matter how we store and use it internally.

Revision 1531929 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 14 14:59:38 2013 UTC (11 years, 6 months ago) by jim
File length: 118331 byte(s)
Diff to previous 1531370 (colored)
clean up socket definition... just the sock: path matters,
and we adjust relative to DefaultRuntimeDir

Revision 1531370 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 11 17:36:24 2013 UTC (11 years, 6 months ago) by jim
File length: 118203 byte(s)
Diff to previous 1531340 (colored)
syntax sugar... if the worker is associated w/ a UDS,
then make sure the log reporting has a visual clue.

Revision 1531340 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 11 16:12:41 2013 UTC (11 years, 6 months ago) by jim
File length: 117930 byte(s)
Diff to previous 1530813 (colored)
Reformat the UDS support inline with a new naming structure.
Use a flag for speed for testing.

Revision 1530813 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 9 22:22:17 2013 UTC (11 years, 6 months ago) by jim
File length: 117335 byte(s)
Diff to previous 1530792 (colored)
save a possible lookup


Revision 1530792 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 9 21:08:55 2013 UTC (11 years, 6 months ago) by trawick
File length: 117351 byte(s)
Diff to previous 1530603 (colored)
follow-up to r1530603: fix typo/syntax error

Revision 1530603 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 9 13:38:45 2013 UTC (11 years, 6 months ago) by jim
File length: 117352 byte(s)
Diff to previous 1526189 (colored)
ping tuning via Yann Ylavic <ylavic.dev@gmail.com>


Revision 1526189 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 25 14:29:02 2013 UTC (11 years, 6 months ago) by trawick
File length: 117235 byte(s)
Diff to previous 1517025 (colored)
mod_proxy: Add ap_connection_reusable() for checking if a connection
is reusable as of this point in processing.

mod_proxy_fcgi uses the new API to determine if FCGI_CONN_CLOSE
should be enabled, but that doesn't change existing behavior
since the connection is currently marked for closure elsewhere
in the module.


Revision 1517025 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 23 20:41:41 2013 UTC (11 years, 7 months ago) by jailletc36
File length: 117066 byte(s)
Diff to previous 1516930 (colored)
No need to lower the string before removing the path, it is just a waste of time.

Revision 1516930 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 23 16:48:42 2013 UTC (11 years, 7 months ago) by jim
File length: 117066 byte(s)
Diff to previous 1516911 (colored)
Allow for a simple socket check in addition to the
higher level protocol-level checks for backends...

Not sure if it makes sense to do both or not... Comments?

Revision 1516911 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 23 16:00:47 2013 UTC (11 years, 7 months ago) by jim
File length: 117021 byte(s)
Diff to previous 1513508 (colored)
Save some cycles...

Revision 1513508 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 13 14:35:47 2013 UTC (11 years, 8 months ago) by druggeri
File length: 116892 byte(s)
Diff to previous 1508416 (colored)
UDS subsequent request on a connection fix

Revision 1508416 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 30 12:33:12 2013 UTC (11 years, 8 months ago) by trawick
File length: 116846 byte(s)
Diff to previous 1503991 (colored)
s/seperate/separate/g

Revision 1503991 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 17 04:54:49 2013 UTC (11 years, 9 months ago) by jailletc36
File length: 116846 byte(s)
Diff to previous 1500437 (colored)
Potential use of uninitialized memory.
Point 3 of PR 54936

Revision 1500437 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 7 14:05:37 2013 UTC (11 years, 9 months ago) by jim
File length: 116839 byte(s)
Diff to previous 1490994 (colored)
conf->mutex is not used... Also, ensure that pool
use is protected


Revision 1490994 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jun 8 14:58:53 2013 UTC (11 years, 10 months ago) by jailletc36
File length: 116839 byte(s)
Diff to previous 1482859 (colored)
NULL terminate the right buffer

Revision 1482859 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 15 14:13:15 2013 UTC (11 years, 11 months ago) by minfrin
File length: 116833 byte(s)
Diff to previous 1482555 (colored)
mod_proxy: Use a global mutex for handling workers.


Revision 1482555 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 14 20:16:59 2013 UTC (11 years, 11 months ago) by minfrin
File length: 116898 byte(s)
Diff to previous 1482522 (colored)
mod_proxy: Make sure we skip empty tokens when parsing the Connection
header.


Revision 1482522 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 14 18:58:06 2013 UTC (11 years, 11 months ago) by minfrin
File length: 116945 byte(s)
Diff to previous 1482170 (colored)
core: Stop the HTTP_IN filter from attempting to write error buckets
to the output filters, which is bogus in the proxy case. Create a
clean mapping from APR codes to HTTP status codes, and use it where
needed.


Revision 1482170 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 14 01:53:53 2013 UTC (11 years, 11 months ago) by fuankg
File length: 116904 byte(s)
Diff to previous 1482075 (colored)
hunk 1: C89 please;
hunk 2: optional functions are usually declared static.


Revision 1482075 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 13 20:11:36 2013 UTC (11 years, 11 months ago) by minfrin
File length: 116903 byte(s)
Diff to previous 1481891 (colored)
mod_proxy, mod_proxy_http: Connection headers must be stripped on the way
in and out, support an optional function to handle this.


Revision 1481891 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 13 14:45:49 2013 UTC (11 years, 11 months ago) by minfrin
File length: 116257 byte(s)
Diff to previous 1480627 (colored)
mod_proxy: Ensure we don't attempt to amend a table we are iterating
through, ensuring that all headers listed by Connection are removed.


Revision 1480627 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 9 13:33:02 2013 UTC (11 years, 11 months ago) by jim
File length: 116244 byte(s)
Diff to previous 1480058 (colored)
Mod_proxy used the global pool w/o mutex. fix.


Revision 1480058 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 7 20:27:37 2013 UTC (11 years, 11 months ago) by minfrin
File length: 115831 byte(s)
Diff to previous 1463455 (colored)
mod_proxy: Ensure network errors detected by the proxy are returned as
504 Gateway Timout as opposed to 502 Bad Gateway, in order to be
compliant with RFC2616 14.9.4 Cache Revalidation and Reload Controls.

[Reverted by r1884280]


Revision 1463455 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 2 09:18:01 2013 UTC (12 years ago) by rpluem
File length: 115871 byte(s)
Diff to previous 1462269 (colored)
* Always try to reuse the address looked up for the worker if we are allowed to
  reuse the address. This saves DNS lookups.


Revision 1462269 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 28 19:36:03 2013 UTC (12 years ago) by rpluem
File length: 115791 byte(s)
Diff to previous 1453981 (colored)
* Improve reusage of already resolved addresses to avoid unnecessary DNS lookups.

Revision 1453981 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 7 17:50:47 2013 UTC (12 years, 1 month ago) by jim
File length: 115335 byte(s)
Diff to previous 1453875 (colored)
message tag for dom sock

Revision 1453875 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 7 14:06:51 2013 UTC (12 years, 1 month ago) by jim
File length: 115325 byte(s)
Diff to previous 1452259 (colored)
Pull out duplicated code to proxy_util...

Revision 1452259 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 4 11:26:17 2013 UTC (12 years, 1 month ago) by jim
File length: 101935 byte(s)
Diff to previous 1451921 (colored)
apr trunk-able


Revision 1451921 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 2 19:17:14 2013 UTC (12 years, 1 month ago) by fuankg
File length: 101900 byte(s)
Diff to previous 1451905 (colored)
Follow-up to r1451905 to fix NetWare/Windows compilation.


Revision 1451905 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 2 17:07:23 2013 UTC (12 years, 1 month ago) by jim
File length: 101871 byte(s)
Diff to previous 1451633 (colored)
Make AF_UNIX aware... fix Windows/Netware??

Revision 1451633 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 1 16:21:49 2013 UTC (12 years, 1 month ago) by jim
File length: 101826 byte(s)
Diff to previous 1428916 (colored)
Add in rough uds support (Bugx 54101) from Blaise Tarr <blaise.tarr@gmail.com>

Revision 1428916 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 4 15:10:21 2013 UTC (12 years, 3 months ago) by jim
File length: 98059 byte(s)
Diff to previous 1421953 (colored)
non-existance of byrequests is not an immediate error

Revision 1421953 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 14 16:14:06 2012 UTC (12 years, 4 months ago) by jim
File length: 97712 byte(s)
Diff to previous 1407085 (colored)
Allow for searching w/i shm slots for a specific worker and balancer

Revision 1407085 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 8 14:01:37 2012 UTC (12 years, 5 months ago) by jim
File length: 96134 byte(s)
Diff to previous 1404653 (colored)
better logging for re-use/use of shm

Revision 1404653 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 1 16:06:43 2012 UTC (12 years, 5 months ago) by jim
File length: 95603 byte(s)
Diff to previous 1387607 (colored)
Allow for setting of sticky session split char...
Bugz 53893


Revision 1387607 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 19 14:18:19 2012 UTC (12 years, 7 months ago) by jim
File length: 95566 byte(s)
Diff to previous 1387444 (colored)
Log whether or not the restore from shm actually
resulted in a match of shm data, or whether it
was stale.


Revision 1387444 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 19 03:51:25 2012 UTC (12 years, 7 months ago) by jim
File length: 95166 byte(s)
Diff to previous 1387110 (colored)
Use identifying server_rec info when we know we have
unique and useful data :)


Revision 1387110 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 18 12:15:50 2012 UTC (12 years, 7 months ago) by jim
File length: 95063 byte(s)
Diff to previous 1386578 (colored)
Persist local balancer-manager changes across restart/graceful.


Revision 1386578 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 17 12:22:33 2012 UTC (12 years, 7 months ago) by jim
File length: 94822 byte(s)
Diff to previous 1386576 (colored)
Don't just willy nilly slurp double slashes... just handle
the end-case where a '//' is not intended (due to how
PPR is stored)


Revision 1386576 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 17 12:11:45 2012 UTC (12 years, 7 months ago) by jim
File length: 94979 byte(s)
Diff to previous 1383490 (colored)
When concatting for PPR, avoid cases where we
concat ".../" and "/..." to create "...//..."

Revision 1383490 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 11 17:39:32 2012 UTC (12 years, 7 months ago) by jim
File length: 94530 byte(s)
Diff to previous 1365479 (colored)
Avoid the overhead of creating and grabbing a uuid for
the balancer nonce if we're never going to use it.

Revision 1365479 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 25 07:28:26 2012 UTC (12 years, 8 months ago) by jorton
File length: 94395 byte(s)
Diff to previous 1365029 (colored)
* modules/proxy/proxy_util.c (ap_proxy_location_reverse_map): Fix
  to skip balancer:// prefix where applicable.

Reviewed by: rjung, rpluem
PR: 45434 (regressed since 2.2)


Revision 1365029 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 24 13:01:13 2012 UTC (12 years, 8 months ago) by jorton
File length: 94365 byte(s)
Diff to previous 1365020 (colored)
* modules/proxy/proxy_util.c (ap_proxy_checkproxyblock): Add error
  handling for apr_sockaddr_ip_getbuf(), minor code style tweaks.


Revision 1365020 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 24 12:54:38 2012 UTC (12 years, 8 months ago) by jorton
File length: 94353 byte(s)
Diff to previous 1365001 (colored)
* modules/proxy/proxy_util.c (ap_proxy_checkproxyblock): Fix memory
  leak/thread-unsafe use of pconf.

Submitted by: rpluem, jorton


Revision 1365001 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 24 12:17:00 2012 UTC (12 years, 8 months ago) by jorton
File length: 94315 byte(s)
Diff to previous 1361801 (colored)
Fix handling of ProxyBlock if a forward proxy is configured, and fix
mod_proxy_connect to avoid an inappropriate DNS lookup:

* modules/proxy/proxy_util.c (ap_proxy_checkproxyblock): Take hostname
  argument, make address argument optional.  Check names against
  hostname arg, omit if addr not given.
  (ap_proxy_determine_connection): Adjust for the above; pass hostname
  from URI not the next hop.

* modules/proxy/mod_proxy_ftp.c (proxy_ftp_handler): Adjust for
  ap_proxy_checkproxyblock change.

* modules/proxy/mod_proxy_connect.c (proxy_connect_handler): Adjust
  similarly, and avoid the DNS lookup on the request-URI hostname if a
  proxy is used.

* include/ap_mmn.h: Bump MMN.

PR: 43697


Revision 1361801 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jul 15 21:14:00 2012 UTC (12 years, 9 months ago) by sf
File length: 94154 byte(s)
Diff to previous 1306409 (colored)
Various code clean up

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 52893 


Revision 1306409 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 28 15:22:40 2012 UTC (13 years ago) by rpluem
File length: 94176 byte(s)
Diff to previous 1228766 (colored)
* Add the forcerecovery balancer parameter that determines if recovery for
  balancer workers without considering the retry value of workers is enforced.
  There might be cases where an already overloaded backend can get into deeper
  trouble if the recovery of all workers is enforced without considering the
  retry parameter of each worker


Revision 1228766 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 8 01:40:01 2012 UTC (13 years, 3 months ago) by jim
File length: 94143 byte(s)
Diff to previous 1227856 (colored)
optimize this... Do strlen() ONLY if we need to check
for overflow.

Revision 1227856 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 5 21:50:31 2012 UTC (13 years, 3 months ago) by wrowe
File length: 94042 byte(s)
Diff to previous 1227855 (colored)
Cure size_t abuse, curse some recent code [recommit good bits from r1227852]

Revision 1227855 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 5 21:48:21 2012 UTC (13 years, 3 months ago) by wrowe
File length: 93907 byte(s)
Diff to previous 1227852 (colored)
Revert a whole mess that was not ment to be committed

Revision 1227852 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 5 21:43:24 2012 UTC (13 years, 3 months ago) by wrowe
File length: 94042 byte(s)
Diff to previous 1227642 (colored)
Cure size_t abuse, curse some recent code

Revision 1227642 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 5 15:45:01 2012 UTC (13 years, 3 months ago) by covener
File length: 93907 byte(s)
Diff to previous 1220493 (colored)
Update the comment and checks around address/connection reusability
in mod_proxy.  

The checks and comment are a vestige of 2.0.x
mod_proxy_http where the backend proxy conn was stored in 
the frontend r->conn_config, but ap_proxy_determine_connection()
doesn't associate the frontend and backend conns like this.




Revision 1220493 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 18 17:52:59 2011 UTC (13 years, 4 months ago) by sf
File length: 94117 byte(s)
Diff to previous 1209952 (colored)
Various code cleanup to avoid compiler, cppcheck, or clang warnings:

modules/debugging/mod_firehose.c: Make some internal functions static
                                  (to do: logs_cleanup() is unused)

modules/filters/mod_charset_lite.c: Remove dead assignments

modules/filters/mod_include.c: likewise

modules/metadata/mod_usertrack.c: likewise

modules/proxy/mod_proxy_ftp.c: likewise

modules/ssl/ssl_engine_pphrase.c: likewise

modules/proxy/mod_proxy_balancer.c: likewise;
                                    Remove NULL check that can never happen

modules/proxy/proxy_util.c: Axe NULL-check that can never happen and if it
                            would, it would just mask another bug

os/unix/unixd.c: likewise

modules/http/http_filters.c: Remove sub-condition that is always true

modules/lua/mod_lua.c: Add default cases to switch statements

modules/generators/mod_autoindex.c: Unsigned value can never be < 0

server/util_expr_eval.c: Fix compiler warnings with VC and on OS2



Revision 1209952 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 17:09:58 2011 UTC (13 years, 4 months ago) by minfrin
File length: 94136 byte(s)
Diff to previous 1209916 (colored)
mod_proxy: Remove dead code ap_proxy_table_unmerge().


Revision 1209916 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 14:39:51 2011 UTC (13 years, 4 months ago) by minfrin
File length: 94855 byte(s)
Diff to previous 1209910 (colored)
mod_proxy: Remove ap_proxy_make_fake_req() from the public API.


Revision 1209910 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 13:38:26 2011 UTC (13 years, 4 months ago) by minfrin
File length: 95907 byte(s)
Diff to previous 1209814 (colored)
mod_proxy: Remove dead code.


Revision 1209814 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 01:08:59 2011 UTC (13 years, 4 months ago) by minfrin
File length: 96832 byte(s)
Diff to previous 1209812 (colored)
mod_proxy: Make sure we populate the client IP from the peer IP for proxy
fake requests.


Revision 1209812 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 01:03:08 2011 UTC (13 years, 4 months ago) by minfrin
File length: 96764 byte(s)
Diff to previous 1209811 (colored)
mod_proxy: Remove ap_proxy_date_canon() from the public API.


Revision 1209811 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 00:57:19 2011 UTC (13 years, 4 months ago) by minfrin
File length: 97263 byte(s)
Diff to previous 1209797 (colored)
mod_proxy: Remove ap_proxy_buckets_lifetime_transform() from the public API.


Revision 1209797 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 3 00:30:06 2011 UTC (13 years, 4 months ago) by minfrin
File length: 99061 byte(s)
Diff to previous 1209776 (colored)
mod_proxy: Remove ap_proxy_liststr(), it duplicates ap_find_token().


Revision 1209776 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 2 23:18:39 2011 UTC (13 years, 4 months ago) by minfrin
File length: 99862 byte(s)
Diff to previous 1209766 (colored)
mod_proxy: Move ap_proxy_string_read() out of the public API into
mod_proxy_ftp.


Revision 1209766 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 2 23:02:04 2011 UTC (13 years, 4 months ago) by sf
File length: 102533 byte(s)
Diff to previous 1209754 (colored)
Add lots of unique tags to error log messages


Revision 1209754 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 2 22:42:39 2011 UTC (13 years, 4 months ago) by minfrin
File length: 101498 byte(s)
Diff to previous 1208897 (colored)
mod_proxy: Make ap_proxy_retry_worker() into an optional function. Allows
mod_lbmethod_bybusyness, mod_lbmethod_byrequests, mod_lbmethod_bytraffic
and mod_lbmethod_heartbeat to be loaded without mod_proxy yet being present,
which happens when modules are loaded in alphabetical order.


Revision 1208897 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 1 00:02:30 2011 UTC (13 years, 4 months ago) by jim
File length: 101453 byte(s)
Diff to previous 1208069 (colored)
Use 2 sep hashing functions to account for collisions...
Safe enough

Revision 1208069 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 29 21:14:47 2011 UTC (13 years, 4 months ago) by jim
File length: 101121 byte(s)
Diff to previous 1208068 (colored)
Ensure casing doesn't matter... (we know balancer->s->name is
lc)

Revision 1208068 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 29 21:14:08 2011 UTC (13 years, 4 months ago) by jim
File length: 101096 byte(s)
Diff to previous 1207926 (colored)
Some optimization... we have a hash, use it. Quicker than all
these string comparisons.

Revision 1207926 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 29 15:36:11 2011 UTC (13 years, 4 months ago) by jim
File length: 101000 byte(s)
Diff to previous 1207562 (colored)
Logic which makes the balancer "active" or not... so we can turn them
off and on as needed.

Revision 1207562 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 28 20:11:44 2011 UTC (13 years, 4 months ago) by jim
File length: 100864 byte(s)
Diff to previous 1207467 (colored)
Pull this out as a sep function to allow for full vhosting
adjustment between get and define balancers...

Revision 1207467 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 28 17:10:17 2011 UTC (13 years, 4 months ago) by jim
File length: 100206 byte(s)
Diff to previous 1207282 (colored)
"Final" (I hope) proxy struct/API changes in order to support
dynamic balancer allocation AND dynamic vhost-balancers

Revision 1207282 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 28 15:11:03 2011 UTC (13 years, 4 months ago) by jim
File length: 100132 byte(s)
Diff to previous 1206286 (colored)
Error-check.

Revision 1206286 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 25 19:28:14 2011 UTC (13 years, 4 months ago) by jim
File length: 99119 byte(s)
Diff to previous 1206268 (colored)
Move useful and shared balancer stuff to the shm slot...
Provide hooks for post-config/runtime addition of
balancers.

Revision 1206268 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 25 17:32:03 2011 UTC (13 years, 4 months ago) by jim
File length: 98649 byte(s)
Diff to previous 1204553 (colored)
Allow compile time changes of field sizes and be more
"clear" regarding the diff between balancer and worker slots...

Revision 1204553 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 21 15:51:40 2011 UTC (13 years, 5 months ago) by jim
File length: 98646 byte(s)
Diff to previous 1203868 (colored)
Never used.

Revision 1203868 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 18 21:49:44 2011 UTC (13 years, 5 months ago) by sf
File length: 98676 byte(s)
Diff to previous 1203859 (colored)
Log fatal errors at level CRIT, not at some random level from DEBUG to EMERG


Revision 1203859 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 18 21:41:09 2011 UTC (13 years, 5 months ago) by sf
File length: 98692 byte(s)
Diff to previous 1196946 (colored)
great proxy logging cleanup:
    
  * remove "proxy:", "FCGI", etc. prefixes and pid which are now
    included in the error log format

  * propagate frontend request's logconfig to backend request
    
  * use ap_log_rerror where possible
    
  * remove obsolete APLOG_NOERRNO


Revision 1196946 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 3 05:35:51 2011 UTC (13 years, 5 months ago) by sf
File length: 99139 byte(s)
Diff to previous 1183475 (colored)
Modify placement of PROXY_DECLARE_DATA to fix build problems with MSVC,
reported by Gregg L. Smith


Revision 1183475 - (view) (download) (annotate) - [select for diffs]
Modified Fri Oct 14 19:51:17 2011 UTC (13 years, 6 months ago) by sf
File length: 99141 byte(s)
Diff to previous 1180654 (colored)
There is absolutely no reason to have two 4k-sized constant strmatch patterns
in each per-dir config.


Revision 1180654 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 9 17:07:17 2011 UTC (13 years, 6 months ago) by sf
File length: 98993 byte(s)
Diff to previous 1174929 (colored)
Remove ap_proxy_removestr(). It has been unused for a decade and has quadratic
memory usage.


Revision 1174929 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 23 18:08:42 2011 UTC (13 years, 6 months ago) by sf
File length: 100099 byte(s)
Diff to previous 1173328 (colored)
More cleanup: Expand tabs and some more indentation fixes
No functional change


Revision 1173328 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 20 20:12:51 2011 UTC (13 years, 7 months ago) by sf
File length: 100092 byte(s)
Diff to previous 1172686 (colored)
Save one call of ap_escape_html on the uri. Reflow code to be more readable.

Submitted by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
PR: 51697


Revision 1172686 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 19 16:25:42 2011 UTC (13 years, 7 months ago) by sf
File length: 100084 byte(s)
Diff to previous 1152273 (colored)
Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


Revision 1152273 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 29 15:40:19 2011 UTC (13 years, 8 months ago) by niq
File length: 100078 byte(s)
Diff to previous 1138627 (colored)
mod_proxy: enable absolute URLs to be rewritten with ProxyPassReverse,
e.g. to reverse proxy "Location: https://other-internal-server/login" with
ProxyPassReverse https://public-address/ https://other-internal-server/



Revision 1138627 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 22 20:45:34 2011 UTC (13 years, 10 months ago) by sf
File length: 100021 byte(s)
Diff to previous 1135083 (colored)
Various code cleanup

PR: 51398
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


Revision 1135083 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 13 10:58:10 2011 UTC (13 years, 10 months ago) by sf
File length: 100006 byte(s)
Diff to previous 1125818 (colored)
Avoid some memory allocations by using apr_table_setn where the string
arguments are const.

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>
PR: 51357


Revision 1125818 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 21 21:06:15 2011 UTC (13 years, 11 months ago) by sf
File length: 100004 byte(s)
Diff to previous 1087371 (colored)
Replace some "apr_p[c]alloc / memcpy" constructions into a single apr_pmemdup()s

PR: 51214
Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr>


Revision 1087371 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 31 17:00:36 2011 UTC (14 years ago) by jim
File length: 100023 byte(s)
Diff to previous 1086287 (colored)
If we change the LB method, or we take add in a new
balancermember ("enable" her), then we need to have the
LBmethod reset its params as required...

Revision 1086287 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 28 15:50:34 2011 UTC (14 years ago) by wrowe
File length: 99874 byte(s)
Diff to previous 1072098 (colored)
Resolve disagreement with its prototype

Revision 1072098 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 18 18:40:25 2011 UTC (14 years, 2 months ago) by jim
File length: 99880 byte(s)
Diff to previous 1069381 (colored)
No longer depend on how fork() works when laying out segments...
function pointers in shm are... nasty ;)

Revision 1069381 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 10 13:29:53 2011 UTC (14 years, 2 months ago) by jim
File length: 99451 byte(s)
Diff to previous 1068879 (colored)
move function...

Revision 1068879 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 9 13:20:09 2011 UTC (14 years, 2 months ago) by jim
File length: 97366 byte(s)
Diff to previous 1068581 (colored)
Ugg... unbalanced workers *do* need a mutex as well (good catch Rüdiger!)

Revision 1068581 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 8 21:08:10 2011 UTC (14 years, 2 months ago) by jim
File length: 97029 byte(s)
Diff to previous 1067269 (colored)
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.

Revision 1067269 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 4 20:01:04 2011 UTC (14 years, 2 months ago) by jim
File length: 95651 byte(s)
Diff to previous 1066631 (colored)
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.

Revision 1066631 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 2 21:25:34 2011 UTC (14 years, 2 months ago) by jim
File length: 95650 byte(s)
Diff to previous 1066607 (colored)
No need to pollute the whole namespace...

Revision 1066607 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 2 20:17:22 2011 UTC (14 years, 2 months ago) by jim
File length: 95559 byte(s)
Diff to previous 1066138 (colored)
Optimize... create a struct to hold the worker status info
(need to align w/ set_params later on) and note when we
update timestamps

Revision 1066138 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 1 19:07:02 2011 UTC (14 years, 2 months ago) by jim
File length: 97043 byte(s)
Diff to previous 1066110 (colored)
Again, abstract out the worker status magic to it's handled
by funcs...

Revision 1066110 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 1 18:13:15 2011 UTC (14 years, 2 months ago) by jim
File length: 95104 byte(s)
Diff to previous 1065750 (colored)
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.

Revision 1065750 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 31 20:29:01 2011 UTC (14 years, 2 months ago) by jim
File length: 93841 byte(s)
Diff to previous 1065748 (colored)
Move the lbmethod to also allow it to be adjusted runtime

Revision 1065748 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 31 20:28:52 2011 UTC (14 years, 2 months ago) by jim
File length: 93845 byte(s)
Diff to previous 1058629 (colored)
Move some "nice to be able to change" balancer stuff to shm

Revision 1058629 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:59:22 2011 UTC (14 years, 3 months ago) by jim
File length: 92766 byte(s)
Diff to previous 1058627 (colored)
Move nonce to balancer struct and add logic for nonce and growth.
Adjust mmn and update doccos

Revision 1058627 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:59:13 2011 UTC (14 years, 3 months ago) by jim
File length: 92586 byte(s)
Diff to previous 1058626 (colored)
Set some defaults... do it here @ worker creation, not initialization

Revision 1058626 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:59:10 2011 UTC (14 years, 3 months ago) by jim
File length: 92521 byte(s)
Diff to previous 1058625 (colored)
whitespace

Revision 1058625 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:59:05 2011 UTC (14 years, 3 months ago) by jim
File length: 92681 byte(s)
Diff to previous 1058624 (colored)
Builds and passes tests as prefork... good save state

Revision 1058624 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:59:02 2011 UTC (14 years, 3 months ago) by jim
File length: 91732 byte(s)
Diff to previous 1058623 (colored)
Adjust for conf->workers being *proxy_worker and balancer->workers being **proxy_worker

Revision 1058623 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:58:57 2011 UTC (14 years, 3 months ago) by jim
File length: 90855 byte(s)
Diff to previous 1058622 (colored)
More movement to shared stuff...

Revision 1058622 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:58:50 2011 UTC (14 years, 3 months ago) by jim
File length: 90610 byte(s)
Diff to previous 1058621 (colored)
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...

Revision 1058621 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 13 15:58:45 2011 UTC (14 years, 3 months ago) by jim
File length: 93030 byte(s)
Diff to previous 1055771 (colored)
Use branch now

Revision 1055771 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 6 07:24:22 2011 UTC (14 years, 3 months ago) by rpluem
File length: 93022 byte(s)
Diff to previous 1055250 (colored)
* Be ANSI C compatible

Revision 1055250 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 5 00:23:43 2011 UTC (14 years, 3 months ago) by minfrin
File length: 93014 byte(s)
Diff to previous 1053966 (colored)
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.


Revision 1053966 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 30 18:28:26 2010 UTC (14 years, 3 months ago) by minfrin
File length: 92886 byte(s)
Diff to previous 1052314 (colored)
Fix a spin should we encounter a corrupt bucket from the proxy.


Revision 1052314 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 23 16:43:43 2010 UTC (14 years, 3 months ago) by rpluem
File length: 92854 byte(s)
Diff to previous 1036605 (colored)
* 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.


Revision 1036605 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 18 20:20:12 2010 UTC (14 years, 5 months ago) by sf
File length: 92947 byte(s)
Diff to previous 1035576 (colored)
Fix 'comparison is always false due to limited range of data type'.
One-bit flags should really be unsigned


Revision 1035576 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 16 10:27:26 2010 UTC (14 years, 5 months ago) by minfrin
File length: 92952 byte(s)
Diff to previous 1035504 (colored)
Revert r1035504, this was the wrong way to do it.


Revision 1035504 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 16 00:23:37 2010 UTC (14 years, 5 months ago) by minfrin
File length: 91101 byte(s)
Diff to previous 1034916 (colored)
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.


Revision 1034916 - (view) (download) (annotate) - [select for diffs]
Modified Sun Nov 14 00:01:43 2010 UTC (14 years, 5 months ago) by niq
File length: 92952 byte(s)
Diff to previous 1032290 (colored)
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


Revision 1032290 - (view) (download) (annotate) - [select for diffs]
Modified Sun Nov 7 14:49:58 2010 UTC (14 years, 5 months ago) by trawick
File length: 91996 byte(s)
Diff to previous 1030850 (colored)
log how long worker will be disabled


Revision 1030850 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 4 08:09:57 2010 UTC (14 years, 5 months ago) by rjung
File length: 91930 byte(s)
Diff to previous 1029134 (colored)
Followup to r1026665: reset "cleaned" flag in
ap_proxy_acquire_connection().


Revision 1029134 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 30 17:56:13 2010 UTC (14 years, 5 months ago) by poirier
File length: 91904 byte(s)
Diff to previous 1026665 (colored)
Fix a number of typos and misspellings.  Reported by Ville Skytta.
PR48496.


Revision 1026665 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 23 19:26:44 2010 UTC (14 years, 5 months ago) by minfrin
File length: 91903 byte(s)
Diff to previous 1025699 (colored)
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.


Revision 1025699 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 20 19:47:00 2010 UTC (14 years, 6 months ago) by minfrin
File length: 91838 byte(s)
Diff to previous 998949 (colored)
Optimise the set flags in the mod_proxy structures.


Revision 998949 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 20 14:51:19 2010 UTC (14 years, 7 months ago) by jim
File length: 91863 byte(s)
Diff to previous 988635 (colored)
Fold in possible use of FNV if desired


Revision 988635 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 24 18:04:06 2010 UTC (14 years, 7 months ago) by trawick
File length: 91533 byte(s)
Diff to previous 988038 (colored)
ap_proxy_retry_worker() only needs to spit out one debug
message, and it should indicate whether or not retry will
be attempted


Revision 988038 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 23 09:09:25 2010 UTC (14 years, 8 months ago) by jfclere
File length: 91515 byte(s)
Diff to previous 985112 (colored)
Prevent race condition
See http://www.mail-archive.com/dev@httpd.apache.org/msg47171.html


Revision 985112 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 13 07:24:36 2010 UTC (14 years, 8 months ago) by rpluem
File length: 91515 byte(s)
Diff to previous 984188 (colored)
* 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.


Revision 984188 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 10 19:46:58 2010 UTC (14 years, 8 months ago) by jim
File length: 90865 byte(s)
Diff to previous 982016 (colored)
Fold in some stuff to allow for matching of workers
to their actual scoreboard slots, independent of slot
ID.


Revision 982016 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 3 19:45:21 2010 UTC (14 years, 8 months ago) by sf
File length: 89856 byte(s)
Diff to previous 964089 (colored)
- 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.


Revision 964089 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 14 16:03:19 2010 UTC (14 years, 9 months ago) by jim
File length: 89855 byte(s)
Diff to previous 951900 (colored)
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.



Revision 951900 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 6 17:07:12 2010 UTC (14 years, 10 months ago) by sf
File length: 88862 byte(s)
Diff to previous 951895 (colored)
- Be less verbose at levels INFO and DEBUG in mod_proxy* and mod_ssl
- Add some trace logging to core and http


Revision 951895 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 6 16:59:50 2010 UTC (14 years, 10 months ago) by sf
File length: 88824 byte(s)
Diff to previous 951189 (colored)
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


Revision 951189 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 3 22:47:46 2010 UTC (14 years, 10 months ago) by sf
File length: 88798 byte(s)
Diff to previous 910124 (colored)
log issues with CONNECT at request scope instead of server scope


Revision 910124 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 14 23:45:59 2010 UTC (15 years, 2 months ago) by rjung
File length: 88826 byte(s)
Diff to previous 910081 (colored)
Handle the pathological case of a connect
backend that sends us an unexpectedly huge response.


Revision 910081 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 14 21:37:36 2010 UTC (15 years, 2 months ago) by rjung
File length: 88230 byte(s)
Diff to previous 910079 (colored)
We need to copy the forward proxy data, because it
might be reused during later requests using the same
backend connection.


Revision 910079 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 14 21:36:03 2010 UTC (15 years, 2 months ago) by rjung
File length: 88180 byte(s)
Diff to previous 909323 (colored)
Limit sscanf format to the number of chars actually
needed and buffer size provided to prevent buffer overflow.


Revision 909323 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 12 09:58:48 2010 UTC (15 years, 2 months ago) by rjung
File length: 88122 byte(s)
Diff to previous 902245 (colored)
Support remote https proxies by using HTTP CONNECT.
PR: 19188
Submitted by: Philippe Dutrueux <lilas evidian.com>
Reviewed by: rjung


Revision 902245 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 22 20:03:25 2010 UTC (15 years, 3 months ago) by trawick
File length: 82351 byte(s)
Diff to previous 893955 (colored)
fix maintainer mode ap_strstr() argument mismatch warnings


Revision 893955 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 26 10:30:52 2009 UTC (15 years, 3 months ago) by niq
File length: 82341 byte(s)
Diff to previous 893871 (colored)
Fix r893871 as noted by rpluem, to remove risk of returning a
relative-ised URL, and fix erroneous CHANGES bug attribution.


Revision 893871 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 25 15:26:49 2009 UTC (15 years, 3 months ago) by niq
File length: 82192 byte(s)
Diff to previous 788718 (colored)
Proxy: fix ProxyPassReverse with relative URL
PR 38864


Revision 788718 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 26 14:26:19 2009 UTC (15 years, 9 months ago) by jfclere
File length: 81863 byte(s)
Diff to previous 774423 (colored)
Don't set worker->s if already set (for balancer using slotmem for examples).


Revision 774423 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 13 16:46:59 2009 UTC (15 years, 11 months ago) by jim
File length: 81707 byte(s)
Diff to previous 774400 (colored)
Return APR_EGENERAL for the error


Revision 774400 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 13 15:27:05 2009 UTC (15 years, 11 months ago) by jfclere
File length: 81695 byte(s)
Diff to previous 772126 (colored)
Allow the load balancing method to "create" workers.


Revision 772126 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 6 10:06:06 2009 UTC (15 years, 11 months ago) by rpluem
File length: 81374 byte(s)
Diff to previous 771976 (colored)
* Fix syntax error


Revision 771976 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 19:29:04 2009 UTC (15 years, 11 months ago) by jim
File length: 81373 byte(s)
Diff to previous 771940 (colored)
optimize.... rp! :)


Revision 771940 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 17:15:48 2009 UTC (15 years, 11 months ago) by jfclere
File length: 81405 byte(s)
Diff to previous 771925 (colored)
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().


Revision 771925 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 16:55:56 2009 UTC (15 years, 11 months ago) by jim
File length: 81382 byte(s)
Diff to previous 771610 (colored)
Explain empty code block (empty for now, that is) :)


Revision 771610 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 07:43:14 2009 UTC (15 years, 11 months ago) by rpluem
File length: 81184 byte(s)
Diff to previous 771587 (colored)
* Silence compiler warning.


Revision 771587 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 06:44:02 2009 UTC (15 years, 11 months ago) by wrowe
File length: 81180 byte(s)
Diff to previous 771583 (colored)
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.



Revision 771583 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 06:39:03 2009 UTC (15 years, 11 months ago) by wrowe
File length: 80984 byte(s)
Diff to previous 771581 (colored)
REVERT 771581 modules/proxy/ changes (miscommitted)

Revision 771581 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 5 06:26:24 2009 UTC (15 years, 11 months ago) by wrowe
File length: 81093 byte(s)
Diff to previous 769020 (colored)
complete r771579, refactoring mod_watchdog as loadable on win32

Revision 769020 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 27 15:02:40 2009 UTC (15 years, 11 months ago) by jim
File length: 80984 byte(s)
Diff to previous 758936 (colored)
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 :)


Revision 758936 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 27 00:05:18 2009 UTC (16 years ago) by trawick
File length: 80940 byte(s)
Diff to previous 758891 (colored)
remove TPF support

Revision 758891 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 26 22:23:44 2009 UTC (16 years ago) by trawick
File length: 80990 byte(s)
Diff to previous 752140 (colored)
remove BeOS OS support


Revision 752140 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 10 15:33:05 2009 UTC (16 years, 1 month ago) by jim
File length: 81026 byte(s)
Diff to previous 712375 (colored)
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.


Revision 712375 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 8 11:09:38 2008 UTC (16 years, 5 months ago) by rpluem
File length: 80917 byte(s)
Diff to previous 706921 (colored)
* 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


Revision 706921 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 22 09:34:21 2008 UTC (16 years, 6 months ago) by rpluem
File length: 84804 byte(s)
Diff to previous 704753 (colored)
* 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


Revision 704753 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 15 00:53:39 2008 UTC (16 years, 6 months ago) by rpluem
File length: 82004 byte(s)
Diff to previous 703998 (colored)
* 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).


Revision 703998 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 13 10:06:28 2008 UTC (16 years, 6 months ago) by rpluem
File length: 82748 byte(s)
Diff to previous 697093 (colored)
* 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


Revision 697093 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 19 13:43:48 2008 UTC (16 years, 7 months ago) by jim
File length: 82004 byte(s)
Diff to previous 684351 (colored)
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


Revision 684351 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 9 21:33:09 2008 UTC (16 years, 8 months ago) by rpluem
File length: 81954 byte(s)
Diff to previous 684341 (colored)
* 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


Revision 684341 - (view) (download) (annotate) - [select for diffs]
Modified Sat Aug 9 20:52:46 2008 UTC (16 years, 8 months ago) by rpluem
File length: 81803 byte(s)
Diff to previous 682369 (colored)
* Add the possibility to set a separate connection timeout for backend
  workers.

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


Revision 682369 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 4 12:53:50 2008 UTC (16 years, 8 months ago) by rpluem
File length: 81300 byte(s)
Diff to previous 645807 (colored)
* 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.


Revision 645807 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 8 09:25:57 2008 UTC (17 years ago) by jim
File length: 81346 byte(s)
Diff to previous 627740 (colored)
Use what we have. This logic belongs here anyway...


Revision 627740 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 14 13:37:18 2008 UTC (17 years, 2 months ago) by jim
File length: 81217 byte(s)
Diff to previous 627728 (colored)
Note why we aren't bothering to check that we have
a valid octet here.


Revision 627728 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 14 12:55:57 2008 UTC (17 years, 2 months ago) by jim
File length: 81091 byte(s)
Diff to previous 619125 (colored)
Add in mod_jk's disablereuse analog for mod_proxy.


Revision 619125 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 6 19:52:04 2008 UTC (17 years, 2 months ago) by rpluem
File length: 80906 byte(s)
Diff to previous 616335 (colored)
* Fix a typo (timout -> timeout)

PR: 44360
Submitted by: Rainer Jung <rainer.jung kippdata.de>
Reviewed by: rpluem


Revision 616335 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 29 14:26:20 2008 UTC (17 years, 2 months ago) by jim
File length: 80905 byte(s)
Diff to previous 605838 (colored)
Now let things like

   ProxyPassReverse /foo balancer://bar

work "as expected" :) :)



Revision 605838 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 20 08:57:23 2007 UTC (17 years, 4 months ago) by rpluem
File length: 78823 byte(s)
Diff to previous 605314 (colored)
* Using the reslist pool for the proxy_conn_rec structure introduces a memory
  leak when connections get created and destroyed frequently by the reslist
  (e.g.  destroying idle elements of the reslist). So use the subpool
  dedicated for the proxy_conn_rec structure to allocate the memory for the
  structure itself.


Revision 605314 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 18 20:03:01 2007 UTC (17 years, 4 months ago) by rpluem
File length: 78818 byte(s)
Diff to previous 604449 (colored)
* Only sent a flush bucket down the chain if buckets where sent down the chain
  before that could still be buffered in the network filter. This is the case
  if we have sent an EOS bucket or if we actually sent buckets with
  data down the chain. In all other cases we either have not sent any
  buckets at all down the chain or we only sent meta buckets that are
  not EOS buckets down the chain. The only meta bucket that remains in
  this case is the flush bucket which would have removed all possibly
  buffered buckets in the network filter.
  If we sent a flush bucket in the case where not ANY buckets were
  sent down the chain, we break error handling which happens AFTER us.


Revision 604449 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 15 16:19:36 2007 UTC (17 years, 4 months ago) by rpluem
File length: 78016 byte(s)
Diff to previous 604447 (colored)
* Tag the pools appropriately to ease memory debugging.


Revision 604447 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 15 16:15:04 2007 UTC (17 years, 4 months ago) by rpluem
File length: 77827 byte(s)
Diff to previous 603543 (colored)
* Fix a SEGFAULT by ensuring that buckets that may have been buffered in the
  network filters get flushed to the network. This is needed since
  these buckets have been created with the bucket allocator of the
  backend connection. This allocator either gets destroyed if
  conn->close is set or the worker address is not reusable which
  causes the connection to the backend to be closed or it will be used
  again by another frontend connection that wants to recycle the
  backend connection.
  In this case we could run into nasty race conditions (e.g. if the
  next user of the backend connection destroys the allocator before we
  sent the buckets to the network).

  Remark 1: Doing a setaside does not help here as the buckets remain
  created by the wrong allocator in this case.

  Remark 2: Yes, this creates a possible performance penalty in the case
  of pipelined requests as we may send only a small amount of data over
  the wire.


Revision 603543 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 12 10:38:19 2007 UTC (17 years, 4 months ago) by rpluem
File length: 75751 byte(s)
Diff to previous 603502 (colored)
* Do not register connection_cleanup as cleanup for the conn->pool. In the past
  it was needed to register connection_cleanup as a cleanup for the frontend
  connection memory pool (c->pool) to ensure that connection returns into the
  connection pool if the memory pool of the frontend connection memory pool
  gets destroyed / cleared. Now we ensure explicitly the connection returns
  to the connection pool once we finished handling the request.


Revision 603502 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 12 07:44:02 2007 UTC (17 years, 4 months ago) by rpluem
File length: 76146 byte(s)
Diff to previous 603237 (colored)
* Fix another memory leak related to PR 44026. Now that we keep the connection
  data structure alive in the reslist, the live time of c->pool is too long.
  r->pool has the correct live time since rp dies before r.


Revision 603237 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 11 13:27:21 2007 UTC (17 years, 4 months ago) by rpluem
File length: 76146 byte(s)
Diff to previous 602542 (colored)
* Use a separate subpool to manage the data for the socket and the connection
  member of the proxy_conn_rec struct as we destroy this data more frequently
  than other data in the proxy_conn_rec struct like hostname and addr (at least
  in the case where we have keepalive connections that timed out and were
  closed by the backend).
  This fixes a memory leak with short lived and broken connections.

PR: 44026


Revision 602542 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 8 20:10:29 2007 UTC (17 years, 4 months ago) by rpluem
File length: 76040 byte(s)
Diff to previous 583802 (colored)
* Enable the proxy to keep connections persistent in the HTTPS case.

  Basicly the persistence is created by keeping the conn_rec structure
  created for our backend connection (whether http or https) in the connection
  pool. This required to adjust scoreboard.c in a way that its functions can
  properly deal with a NULL scoreboard handle by ignoring the call or returning
  an error code.


Revision 583802 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 11 12:37:09 2007 UTC (17 years, 6 months ago) by jim
File length: 74525 byte(s)
Diff to previous 583466 (colored)
Semi-revert 583466; just remove the ap_proxy_isvalidenc()
function until we canonically set the "allowed" list.


Revision 583466 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 10 13:16:56 2007 UTC (17 years, 6 months ago) by jim
File length: 75349 byte(s)
Diff to previous 580466 (colored)
Abstract out "verification of valid encoding" via
ap_proxy_isvalidenc(). Now we can use it in other
proxy protocols.


Revision 580466 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 28 19:30:37 2007 UTC (17 years, 6 months ago) by niq
File length: 74525 byte(s)
Diff to previous 574843 (colored)
Fix keepalive to proxy backend
PR 43472


Revision 574843 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 12 08:34:40 2007 UTC (17 years, 7 months ago) by jfclere
File length: 74493 byte(s)
Diff to previous 574486 (colored)
lb_score is bigger proxy_worker_stat. Prevent wasting space.


Revision 574486 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 11 06:40:11 2007 UTC (17 years, 7 months ago) by rpluem
File length: 74461 byte(s)
Diff to previous 574269 (colored)
* This check is now part of the PROXY_WORKER_IS_INITIALIZED macro.


Revision 574269 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 10 14:54:01 2007 UTC (17 years, 7 months ago) by jim
File length: 74474 byte(s)
Diff to previous 573939 (colored)
Maintain the illusion. It's not worth my time or
energy to care about this anymore.


Revision 573939 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 9 01:13:38 2007 UTC (17 years, 7 months ago) by niq
File length: 74098 byte(s)
Diff to previous 573911 (colored)
Escape error-notes correctly
PR 40952


Revision 573911 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 8 21:43:47 2007 UTC (17 years, 7 months ago) by niq
File length: 74097 byte(s)
Diff to previous 573903 (colored)
Check all IP addresses listed in ProxyBlock
PR 36987


Revision 573903 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 8 20:29:14 2007 UTC (17 years, 7 months ago) by niq
File length: 74060 byte(s)
Diff to previous 573569 (colored)
mod_proxy: Don't lose bytes when a response line arrives in small chunks.
PR 40894


Revision 573569 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 7 13:13:37 2007 UTC (17 years, 7 months ago) by jim
File length: 74018 byte(s)
Diff to previous 562510 (colored)
Reinstate the lb_score patch, but, protect against
conflicting leakage as per jfc proposal.



Revision 562510 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 3 15:57:27 2007 UTC (17 years, 8 months ago) by jim
File length: 74390 byte(s)
Diff to previous 562069 (colored)
  *) mod_proxy: Improve network performance by setting APR_TCP_NODELAY
     (disable Nagle algorithm) on sockets if implemented.
     PR 42871 [Christian BOITEL <christian_boitel yahoo.fr>, Jim Jagielski]



Revision 562069 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 2 10:17:25 2007 UTC (17 years, 8 months ago) by niq
File length: 73801 byte(s)
Diff to previous 561616 (colored)
Improvement suggested by rpluem to proxy_date fix


Revision 561616 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 1 00:58:20 2007 UTC (17 years, 8 months ago) by niq
File length: 74053 byte(s)
Diff to previous 550514 (colored)
Fix buffer overflow in date handling
PR 41144 (Davi Arnaut)


Revision 550514 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 25 14:29:54 2007 UTC (17 years, 9 months ago) by jfclere
File length: 75686 byte(s)
Diff to previous 546128 (colored)
Fix the timeout logic. The order is now:
1 - worker->timeout
2 - proxy_conf->timeout
3 - server->timeout.
ap_get_module_config() is not perfect by that is easy to port back to 2.2.x.


Revision 546128 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 11 12:40:37 2007 UTC (17 years, 10 months ago) by jfclere
File length: 75433 byte(s)
Diff to previous 535354 (colored)
Arrange the proxy timeout behaviour.


Revision 535354 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 4 19:12:38 2007 UTC (17 years, 11 months ago) by jim
File length: 75121 byte(s)
Diff to previous 484978 (colored)
Abstract out (kinda) MSG_PEEK. This way when we
actually update APR and apr_socket_recvfrom()
to know about APR_MSG_OOB, APR_MSG_PEEK, etc...
this code won't need to be adjusted. Also,
make nicer for 2.2 backport.



Revision 484978 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 9 13:47:56 2006 UTC (18 years, 4 months ago) by jim
File length: 75006 byte(s)
Diff to previous 484792 (colored)
Isolate the unlock return vals 


Revision 484792 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 8 21:37:08 2006 UTC (18 years, 4 months ago) by jim
File length: 74967 byte(s)
Diff to previous 481901 (colored)
Failure to unlock is very nasty, so log it to help
with troubleshooting.


Revision 481901 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 3 21:24:43 2006 UTC (18 years, 4 months ago) by rpluem
File length: 74821 byte(s)
Diff to previous 473278 (colored)
* Ensure that at least scheme://hostname[:port] matches between worker and URL
  when trying to find the worker that fits best to the given URL.

PR: 40910


Revision 473278 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 10 09:15:21 2006 UTC (18 years, 5 months ago) by mturk
File length: 74514 byte(s)
Diff to previous 473276 (colored)
Add alternate is_socket_connected by using APR functions.

Revision 473276 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 10 09:12:57 2006 UTC (18 years, 5 months ago) by mturk
File length: 73238 byte(s)
Diff to previous 470076 (colored)
Remove alternate is_socket_connected detection.

Revision 470076 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 1 20:20:42 2006 UTC (18 years, 5 months ago) by rpluem
File length: 74515 byte(s)
Diff to previous 452327 (colored)
* Assign rv in the if statement to return the correct error code and
  more important an error code at all, as currently APR_SUCCESS is returned
  in the error case.

PR: 40865
Submitted by: Andrew Rucker Jones <arjones simultan.dyndns.org>
Reviewed by: rpluem


Revision 452327 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 3 07:15:46 2006 UTC (18 years, 6 months ago) by mturk
File length: 74337 byte(s)
Diff to previous 451896 (colored)
Add missing include for experimental is_connected.

Revision 451896 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 2 07:06:24 2006 UTC (18 years, 6 months ago) by mturk
File length: 74290 byte(s)
Diff to previous 451580 (colored)
Cleanup alternate is_connected method.
It works for sure on win32,linux and solaris.
I do not have access to other platforms so can not
verify it works on them.

Revision 451580 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 30 11:04:46 2006 UTC (18 years, 6 months ago) by mturk
File length: 74500 byte(s)
Diff to previous 451575 (colored)
Add alternative is_socket_connected implementation.
It works on win32 and linux for sure, so that's why
I put it inside the #ifdef.
Of course something like that needs APR abstraction.

Revision 451575 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 30 10:41:51 2006 UTC (18 years, 6 months ago) by mturk
File length: 73060 byte(s)
Diff to previous 443503 (colored)
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.

Revision 443503 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 14 22:34:34 2006 UTC (18 years, 7 months ago) by rpluem
File length: 73056 byte(s)
Diff to previous 431339 (colored)
* PROXY_WORKER_IS_INITIALIZED checks if PROXY_WORKER_INITIALIZED is set in
  worker->s->status, but we need to check here if it is set in worker->status.

  As PROXY_WORKER_INITIALIZED is set in worker->s->status in
  ap_proxy_initialize_worker_share, which is called just before
  ap_proxy_initialize_worker we never initialize the worker. This is very bad
  as we create no reslist for the pool in this case.


Revision 431339 - (view) (download) (annotate) - [select for diffs]
Modified Mon Aug 14 13:26:07 2006 UTC (18 years, 8 months ago) by niq
File length: 73050 byte(s)
Diff to previous 429890 (colored)
PR#37770: Don't try to use dead backend connection in proxy
(Patch from Olivier BOEL)


Revision 429890 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 8 23:50:33 2006 UTC (18 years, 8 months ago) by niq
File length: 72999 byte(s)
Diff to previous 429879 (colored)
Fix tabs introduced in r429875


Revision 429879 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 8 23:27:25 2006 UTC (18 years, 8 months ago) by niq
File length: 72740 byte(s)
Diff to previous 429875 (colored)
PR#38448: don't URLencode tilde in path component
On reflection, this patch makes sense (since the URL spec got updated), and it's trivial.


Revision 429875 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 8 23:18:23 2006 UTC (18 years, 8 months ago) by niq
File length: 72739 byte(s)
Diff to previous 427959 (colored)
Fix style (indentation at least) to apache style rules before reviewing top of this.
No functional change.


Revision 427959 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 2 12:03:42 2006 UTC (18 years, 8 months ago) by mturk
File length: 70849 byte(s)
Diff to previous 427055 (colored)
Cleanup: Remove close_on_recycle from proxy_conn_rec.
It behaves the same as close.

Revision 427055 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 31 09:33:28 2006 UTC (18 years, 8 months ago) by mturk
File length: 70910 byte(s)
Diff to previous 421686 (colored)
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.

Revision 421686 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 13 19:00:26 2006 UTC (18 years, 9 months ago) by niq
File length: 71008 byte(s)
Diff to previous 421283 (colored)
Support environment variable interpolation in reverse proxy configuration


Revision 421283 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 12 15:01:15 2006 UTC (18 years, 9 months ago) by jim
File length: 70215 byte(s)
Diff to previous 420986 (colored)
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.


Revision 420986 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 11 20:39:38 2006 UTC (18 years, 9 months ago) by jim
File length: 70224 byte(s)
Diff to previous 420983 (colored)
Add in hot-standby balancer member. If all other members
are disabled or not-usable, ONLY THEN will the hot
standby's be used.


Revision 420983 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 11 20:33:53 2006 UTC (18 years, 9 months ago) by fielding
File length: 70215 byte(s)
Diff to previous 420954 (colored)
update license header text

Revision 420954 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 11 19:32:36 2006 UTC (18 years, 9 months ago) by jim
File length: 70068 byte(s)
Diff to previous 395552 (colored)
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.


Revision 395552 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 20 10:35:41 2006 UTC (19 years ago) by jorton
File length: 70094 byte(s)
Diff to previous 395228 (colored)
* modules/proxy/proxy_util.c (ap_proxy_initialize_worker): Fix
gcc strict-aliasing warning.


Revision 395228 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 19 12:11:27 2006 UTC (19 years ago) by colm
File length: 70063 byte(s)
Diff to previous 395180 (colored)
Update the copyright year in all .c, .h and .xml files


Revision 395180 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 19 08:56:59 2006 UTC (19 years ago) by martin
File length: 70063 byte(s)
Diff to previous 394390 (colored)
Fix for platforms without threads: inreslist exists only if APR_HAS_THREADS is set

Revision 394390 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 15 22:45:00 2006 UTC (19 years ago) by niq
File length: 70009 byte(s)
Diff to previous 394088 (colored)
PR#39321 - don't segfault if a bad URL is specified in ProxyPass


Revision 394088 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 14 13:20:28 2006 UTC (19 years ago) by rpluem
File length: 69923 byte(s)
Diff to previous 392613 (colored)
* 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


Revision 392613 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 8 21:43:24 2006 UTC (19 years ago) by rpluem
File length: 69436 byte(s)
Diff to previous 390210 (colored)
* Check for an existing socket independant of an existing connection record.
  This ensures that requests handled by the '*' worker are sent to the correct
  backend server.

PR: 39253


Revision 390210 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 30 18:32:53 2006 UTC (19 years ago) by jim
File length: 69452 byte(s)
Diff to previous 384580 (colored)
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.


Revision 384580 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 9 18:39:16 2006 UTC (19 years, 1 month ago) by jim
File length: 69462 byte(s)
Diff to previous 378032 (colored)
Make AJP flushing admin configurable.


Revision 378032 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 15 16:44:42 2006 UTC (19 years, 2 months ago) by jim
File length: 69364 byte(s)
Diff to previous 377780 (colored)
  *) mod_proxy: Fix KeepAlives not being allowed and set to
     backend servers. PR38602. [Ruediger Pluem, Jim Jagielski]

Also, document previous patch:
  *) Correctly initialize mod_proxy workers, which use a
     combination of local and shared datasets. Adjust logging
     to better trace usage. PR38403. [Jim Jagielski]



Revision 377780 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 14 17:35:36 2006 UTC (19 years, 2 months ago) by jim
File length: 69702 byte(s)
Diff to previous 377738 (colored)
OK, handle better the initializing of worker, separating
"shared" and "local" inits, and being aware that if the
shared aspects are initialized, this doesn't mean
the local ones are :)


Revision 377738 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 14 14:55:02 2006 UTC (19 years, 2 months ago) by jim
File length: 68978 byte(s)
Diff to previous 366181 (colored)
I wondered why I never saw the scoreboard init entry; now I know.
The logic flow was slightly askew.


Revision 366181 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 5 13:46:57 2006 UTC (19 years, 3 months ago) by rpluem
File length: 68792 byte(s)
Diff to previous 365374 (colored)
* If a subrequest has a broken backend also set no_cache for the main request
  and ensure that the chunk filter does not sent the last chunk marker in this
  case.

  modules/http/chunk_filter.c: Memorize HTTP_BAD_GATEWAY error buckets that
                               had been seen in filter context to ensure
                               that we do not sent the last chunk marker in
                               this case.
  modules/proxy/proxy_util.c : Set no_cache also for main request if we are
                               a subrequest.

  Thanks to Joe Orton and André Malo for the "invented unique pointer" trick.


Revision 365374 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 2 16:39:22 2006 UTC (19 years, 3 months ago) by rpluem
File length: 68643 byte(s)
Diff to previous 356030 (colored)
* 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


Revision 356030 - (view) (download) (annotate) - [select for diffs]
Modified Sun Dec 11 21:36:27 2005 UTC (19 years, 4 months ago) by jim
File length: 68190 byte(s)
Diff to previous 350250 (colored)
OK, while we ponder how best to reuse conn pools for workers,
clean this section up.


Revision 350250 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 1 13:50:11 2005 UTC (19 years, 4 months ago) by jim
File length: 68326 byte(s)
Diff to previous 350009 (colored)
Until we determine whether we should dip into the connection
pool each time, rearrange the logic to avoid a double
check which is unneeded. No matter what (if it's reusable or
not) a null conn->hostname needs to be set. At that
point it doesn't matter if we're not reusing it or
if the string comparison happens, since what we
would do in that case has already been done.


Revision 350009 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 30 18:40:05 2005 UTC (19 years, 4 months ago) by jim
File length: 68367 byte(s)
Diff to previous 349723 (colored)
Check that conn->hostname is valid before we do the string
comparison


Revision 349723 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 29 15:05:16 2005 UTC (19 years, 4 months ago) by jim
File length: 68330 byte(s)
Diff to previous 332306 (colored)
Fix case where a shared keepalive connection results in
different workers from being accessed. Try to be wise and
fast about the tests before we do the expensive string
comparison.


Revision 332306 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 10 15:11:44 2005 UTC (19 years, 5 months ago) by jim
File length: 67860 byte(s)
Diff to previous 330085 (colored)
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


Revision 330085 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 1 16:15:09 2005 UTC (19 years, 5 months ago) by jim
File length: 67894 byte(s)
Diff to previous 329849 (colored)
Move to a different impl which was my 1st concept and that which
Ruediger likes. Instead of adjusting pointers to areas
within the URL, simply copy it over and change it as needed.
Easier logic and not that much slower for normal cases.


Revision 329849 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 31 16:31:29 2005 UTC (19 years, 5 months ago) by jim
File length: 68035 byte(s)
Diff to previous 328463 (colored)
Fix a problem where we are doing a case insensitive
match between the worker and the URL. Instead, only
the scheme and hostname are insensitive, the rest
should be case sensitive.


Revision 328463 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 25 19:54:11 2005 UTC (19 years, 5 months ago) by rpluem
File length: 67369 byte(s)
Diff to previous 314881 (colored)
* Fix PR36906 by not lower caseing the whole worker name. Only lower case the
  schema when storing the worker url. Thus preventing case sensitive URI's in
  BalancerMembers to get broken.


Revision 314881 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 12 13:05:59 2005 UTC (19 years, 6 months ago) by jim
File length: 67337 byte(s)
Diff to previous 314875 (colored)
Performance Tune: Do the cheap and fast length check before
we bother doing a char-by-char comparison. 


Revision 314875 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 12 13:01:25 2005 UTC (19 years, 6 months ago) by jim
File length: 67337 byte(s)
Diff to previous 312963 (colored)
Fix -Wall warning... Thanks to Joe for the head's up!


Revision 312963 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 11 21:40:32 2005 UTC (19 years, 6 months ago) by jim
File length: 67326 byte(s)
Diff to previous 293301 (colored)
mod_proxy_balancer: BalancerManager and proxies correctly handle
member workers with paths. PR36816. [Ruediger Pluem, Jim Jagielski]


Revision 293301 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 3 10:54:34 2005 UTC (19 years, 6 months ago) by rpluem
File length: 66982 byte(s)
Diff to previous 292434 (colored)
* Fix style nits (whitespaces / formats of comments). No Functional changes.


Revision 292434 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 29 13:59:27 2005 UTC (19 years, 6 months ago) by jim
File length: 66906 byte(s)
Diff to previous 279752 (colored)
de-ref bug - balancer is always not null since it's &balancer
from the caller.


Revision 279752 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 9 12:28:02 2005 UTC (19 years, 7 months ago) by jim
File length: 66905 byte(s)
Diff to previous 279305 (colored)
Proxy balancer lbmethods are now registered as providers and not
via hooks. Move various find() functions back to mod_proxy_balancer
where they belong :)


Revision 279305 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 7 12:04:15 2005 UTC (19 years, 7 months ago) by jim
File length: 72589 byte(s)
Diff to previous 232311 (colored)
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


Revision 232311 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 12 15:22:19 2005 UTC (19 years, 8 months ago) by martin
File length: 66993 byte(s)
Diff to previous 232282 (colored)
Get rid of some warnings

Revision 232282 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 12 12:47:04 2005 UTC (19 years, 8 months ago) by jim
File length: 66923 byte(s)
Diff to previous 232247 (colored)
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...


Revision 232247 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 12 09:38:09 2005 UTC (19 years, 8 months ago) by niq
File length: 66564 byte(s)
Diff to previous 225751 (colored)
Fix mess left by incompleteness of previous ProxyPassReverse fix


Revision 225751 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jul 28 11:16:34 2005 UTC (19 years, 8 months ago) by mturk
File length: 66570 byte(s)
Diff to previous 178391 (colored)
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.

Revision 178391 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 25 06:42:33 2005 UTC (19 years, 11 months ago) by pquerna
File length: 66551 byte(s)
Diff to previous 160674 (colored)
- Use apr_uri_t to parse the proxy URL, instead of munging it by hand. Original code did not handle IPv6 Addresses correctly.


Revision 160674 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 9 10:08:56 2005 UTC (20 years ago) by mturk
File length: 66970 byte(s)
Diff to previous 160663 (colored)
Revert the latest hack for setting query string.
The balancer needs canon_handler.

Revision 160663 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 9 07:32:42 2005 UTC (20 years ago) by mturk
File length: 67028 byte(s)
Diff to previous 153105 (colored)
Add r->args to uri->query if the original r->uri
did not contain query string. This fixes #34266.

Revision 153105 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 9 19:01:43 2005 UTC (20 years, 2 months ago) by trawick
File length: 66970 byte(s)
Diff to previous 152964 (colored)
Remove formatting characters from ap_log_error() calls.  These
were escaped as fallout from CAN-2003-0020.

Submitted by: Eric Covener <ecovener gmail.com>
Reviewed by: Jeff Trawick


Revision 152964 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 8 23:57:50 2005 UTC (20 years, 2 months ago) by striker
File length: 66976 byte(s)
Diff to previous 151408 (colored)
* modules/proxy/proxy_util.c

  (ap_proxy_pre_request): Log an error when all workers are busy.


Revision 151408 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (20 years, 2 months ago) by jerenkrantz
File length: 66846 byte(s)
Diff to previous 151153 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.


Revision 151153 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 3 13:38:24 2005 UTC (20 years, 2 months ago) by jim
File length: 66810 byte(s)
Diff to previous 126304 (colored)
Close PR 32459, 15207. API change for PROXY_DECLARE ap_proxy_canonenc()


Revision 126304 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 24 18:28:16 2005 UTC (20 years, 2 months ago) by jim
File length: 66664 byte(s)
Diff to previous 124901 (colored)
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.


Revision 124901 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 11 08:35:46 2005 UTC (20 years, 3 months ago) by striker
File length: 66617 byte(s)
Diff to previous 123884 (colored)
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).


Revision 123884 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 2 08:00:26 2005 UTC (20 years, 3 months ago) by mturk
File length: 62335 byte(s)
Diff to previous 123842 (colored)
Kill the pool cleanup when closing non cachable connection.

Revision 123842 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 1 16:04:25 2005 UTC (20 years, 3 months ago) by mturk
File length: 62088 byte(s)
Diff to previous 123840 (colored)
Fix closing connection for non-cachable proxies.
Do not close the entire connection, just socket if
opened.

Revision 123840 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 1 15:23:51 2005 UTC (20 years, 3 months ago) by mturk
File length: 62113 byte(s)
Diff to previous 123811 (colored)
Close the connection for generic forward and
reverse proxy workers.

Revision 123811 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 31 17:25:58 2004 UTC (20 years, 3 months ago) by mturk
File length: 61835 byte(s)
Diff to previous 123809 (colored)
Simplify connection address and port resolving for non-cachable workers (gereric forward and reverse proxy).

Revision 123809 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 31 17:01:05 2004 UTC (20 years, 3 months ago) by mturk
File length: 61749 byte(s)
Diff to previous 111827 (colored)
Do not cache hostname and port for forward and
reverse generic proxy workers. 

Revision 111827 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 14 15:45:19 2004 UTC (20 years, 4 months ago) by mturk
File length: 61414 byte(s)
Diff to previous 111304 (colored)
Make proxy address cache thread safe and available only
to pooled workers.

Revision 111304 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 8 20:19:04 2004 UTC (20 years, 4 months ago) by trawick
File length: 60786 byte(s)
Diff to previous 109506 (colored)
mod_proxy: Respect errors reported by pre_connection hooks.


Revision 109506 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 2 16:37:41 2004 UTC (20 years, 4 months ago) by trawick
File length: 60509 byte(s)
Diff to previous 109316 (colored)
wrong format string was converted to APR_PID_T_FMT


Revision 109316 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 1 08:44:11 2004 UTC (20 years, 4 months ago) by mturk
File length: 60509 byte(s)
Diff to previous 106903 (colored)
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.

Revision 106903 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 29 10:54:46 2004 UTC (20 years, 4 months ago) by mturk
File length: 59746 byte(s)
Diff to previous 106902 (colored)
Use APR_PID_T_FMT instead %d for pid logging.

Revision 106902 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 29 10:43:28 2004 UTC (20 years, 4 months ago) by mturk
File length: 59714 byte(s)
Diff to previous 106103 (colored)
Make sure that worker initialization is done only
once per worker, as well the initialization of shared
memory slot. Also log the child pid so that logging
makes sense.

Revision 106103 - (view) (download) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (20 years, 5 months ago) by nd
File length: 59362 byte(s)
Diff to previous 105480 (colored)
general property cleanup


Revision 105480 - (view) (download) (annotate) - [select for diffs]
Modified Sat Oct 16 06:52:35 2004 UTC (20 years, 6 months ago) by mturk
File length: 59362 byte(s)
Diff to previous 105345 (colored)
Do not use reslist if it wasn't created. This fixes cases on prefork with
threads enabled and hmax set.


Revision 105345 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 29 19:05:44 2004 UTC (20 years, 6 months ago) by mturk
File length: 59343 byte(s)
Diff to previous 105320 (colored)
Add server_rec to initialize_worker_share so that it get's
correctly.


Revision 105320 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 28 16:54:29 2004 UTC (20 years, 6 months ago) by mturk
File length: 58945 byte(s)
Diff to previous 105318 (colored)
Reformat code to no tab and no CR-LF


Revision 105318 - (view) (download) (annotate) - [select for diffs]
Modified Tue Sep 28 16:35:29 2004 UTC (20 years, 6 months ago) by mturk
File length: 59809 byte(s)
Diff to previous 105293 (colored)
Make sure that we don't increase balancer worker count on
gracefull restart. Thanks to Christian...again.


Revision 105293 - (view) (download) (annotate) - [select for diffs]
Modified Sun Sep 26 06:54:27 2004 UTC (20 years, 6 months ago) by mturk
File length: 58116 byte(s)
Diff to previous 105177 (colored)
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.


Revision 105177 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 17 08:00:20 2004 UTC (20 years, 7 months ago) by mturk
File length: 57259 byte(s)
Diff to previous 105136 (colored)
Make worker retry algorithm much  simpler removing incremental
timeout increase.


Revision 105136 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 15 12:20:19 2004 UTC (20 years, 7 months ago) by mturk
File length: 57502 byte(s)
Diff to previous 105132 (colored)
Fix worker retries and limit default retry timeout to 10 minutes.
Thanks to Christian von Roques for spotting that.


Revision 105132 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 15 11:57:02 2004 UTC (20 years, 7 months ago) by mturk
File length: 57338 byte(s)
Diff to previous 105110 (colored)
Register output function so that core can retrieve it and set
scoreboard accordingly


Revision 105110 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 13 11:36:24 2004 UTC (20 years, 7 months ago) by mturk
File length: 57377 byte(s)
Diff to previous 105109 (colored)
Fix typo -- uri is constructed when there is no proxy in chain.


Revision 105109 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 13 11:30:22 2004 UTC (20 years, 7 months ago) by mturk
File length: 57376 byte(s)
Diff to previous 105108 (colored)
No need to allocate hostname on each request for
persistent connections.


Revision 105108 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 13 11:13:28 2004 UTC (20 years, 7 months ago) by mturk
File length: 57293 byte(s)
Diff to previous 105073 (colored)
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.


Revision 105073 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 11 10:50:05 2004 UTC (20 years, 7 months ago) by mturk
File length: 57239 byte(s)
Diff to previous 105070 (colored)
Use worker as a parameter for connection_constructor.
When min connections is greater then zero connstructor is
called when the reslist is created.


Revision 105070 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 11 09:31:10 2004 UTC (20 years, 7 months ago) by mturk
File length: 57285 byte(s)
Diff to previous 105069 (colored)
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.


Revision 105069 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 11 09:12:26 2004 UTC (20 years, 7 months ago) by mturk
File length: 57067 byte(s)
Diff to previous 105068 (colored)
Remove the unused close_connection function.


Revision 105068 - (view) (download) (annotate) - [select for diffs]
Modified Sat Sep 11 09:08:00 2004 UTC (20 years, 7 months ago) by mturk
File length: 57361 byte(s)
Diff to previous 105064 (colored)
Make sure that the connection pool cleanup is called before
the reslist is destroyed.


Revision 105064 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 10 18:29:16 2004 UTC (20 years, 7 months ago) by mturk
File length: 57209 byte(s)
Diff to previous 105059 (colored)
Just like for balancers initialize the workers on post_config
instead on first request to skip the race condition.


Revision 105059 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 10 14:32:11 2004 UTC (20 years, 7 months ago) by mturk
File length: 57562 byte(s)
Diff to previous 105057 (colored)
Remove the proxy_conn_cleanup. The socket will be closed
when the pool is cleared or destroyed by it's own cleanup routine.
Also skip clearing sockets if the workers pool is destroyed, cause
the pool might already be destroyed.


Revision 105057 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 10 08:16:25 2004 UTC (20 years, 7 months ago) by mturk
File length: 58061 byte(s)
Diff to previous 105056 (colored)
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.


Revision 105056 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 19:57:29 2004 UTC (20 years, 7 months ago) by mturk
File length: 59723 byte(s)
Diff to previous 105050 (colored)
Remove unneeded variable. No functional change.


Revision 105050 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 16:14:41 2004 UTC (20 years, 7 months ago) by mturk
File length: 59764 byte(s)
Diff to previous 105049 (colored)
Make sure that the status is not overwritten.


Revision 105049 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 15:54:50 2004 UTC (20 years, 7 months ago) by trawick
File length: 59763 byte(s)
Diff to previous 105048 (colored)
spellcheck


Revision 105048 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 13:51:08 2004 UTC (20 years, 7 months ago) by mturk
File length: 59762 byte(s)
Diff to previous 105047 (colored)
First try the reverse proxies. If there is no worker defined for
requested uri use the forward worker, but only for PROXYREQ_PROXY
requests.


Revision 105047 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 13:15:40 2004 UTC (20 years, 7 months ago) by mturk
File length: 59861 byte(s)
Diff to previous 105046 (colored)
Add PROXY_WORKER_IGNORE_ERRORS flags that
disables puting the entire worker in retry mode, cause
for forward workers the remote is not fixed.


Revision 105046 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 13:03:06 2004 UTC (20 years, 7 months ago) by mturk
File length: 59745 byte(s)
Diff to previous 105045 (colored)
Add sockaddr to proxy_conn_rec. Using the workers address
is unsafe for forward proxy workers, cause unlike reverse
proxies the forward can have each connection with different
remote address.


Revision 105045 - (view) (download) (annotate) - [select for diffs]
Modified Thu Sep 9 10:26:29 2004 UTC (20 years, 7 months ago) by mturk
File length: 59630 byte(s)
Diff to previous 104708 (colored)
Use forward worker for all PROXYREQ_PROXY requests.


Revision 104708 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 18 13:34:17 2004 UTC (20 years, 8 months ago) by minfrin
File length: 59078 byte(s)
Diff to previous 104646 (colored)
Fix some compiler warnings in proxy
PR:
Obtained from:
Submitted by:	Geoffrey Young <geoff@modperlcookbook.org>
Reviewed by:


Revision 104646 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 13 12:20:53 2004 UTC (20 years, 8 months ago) by trawick
File length: 59001 byte(s)
Diff to previous 104628 (colored)
axe some unused variables and don't log an error code that
hasn't been initialized


Revision 104628 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 23:30:54 2004 UTC (20 years, 8 months ago) by wrowe
File length: 59080 byte(s)
Diff to previous 104625 (colored)
Fix setting of hostname for backend.
The now reflects the real name withouth scheme:// prefix.

Submitted by: mturk


Revision 104625 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 23:10:35 2004 UTC (20 years, 8 months ago) by wrowe
File length: 59068 byte(s)
Diff to previous 104624 (colored)
Added dynamic worker limit. It ensures that the addng dynamic
workers to the balancers never excedes that limit.

Submitted by: mturk


Revision 104624 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 23:09:57 2004 UTC (20 years, 8 months ago) by wrowe
File length: 58552 byte(s)
Diff to previous 104619 (colored)
Add some extra debugging to ease the bug chasing :)

Submitted by: mturk


Revision 104619 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 23:05:59 2004 UTC (20 years, 8 months ago) by wrowe
File length: 57421 byte(s)
Diff to previous 104617 (colored)
Implement the worker retry functionality.
It uses either worker->retry option or default 60 second retry
that is on each revolution extended by another 60 seconds.

Submitted by: mturk


Revision 104617 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 23:02:53 2004 UTC (20 years, 8 months ago) by wrowe
File length: 55793 byte(s)
Diff to previous 104611 (colored)
Shared memory support. The shared memory is inside
apache scoreboard. If it ever gets back ported we could use it on 2.0

Submitted by: mturk


Revision 104611 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:56:51 2004 UTC (20 years, 8 months ago) by wrowe
File length: 54921 byte(s)
Diff to previous 104610 (colored)
Add route and redirect to worker so they can be set trough configuration.
Add worker status flag definitions.

Submitted by: mturk


Revision 104610 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:55:28 2004 UTC (20 years, 8 months ago) by wrowe
File length: 54914 byte(s)
Diff to previous 104602 (colored)
Set initial lbstatus to calculated lbfactor.

Submitted by: mturk


Revision 104602 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:44:38 2004 UTC (20 years, 8 months ago) by wrowe
File length: 54976 byte(s)
Diff to previous 104600 (colored)
Fix the assertion bug for reslist caused by returning the
same connection back to the pool twice.

Submitted by: mturk


Revision 104600 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:41:02 2004 UTC (20 years, 8 months ago) by wrowe
File length: 55526 byte(s)
Diff to previous 104599 (colored)
Change the scheme handler hook to include worker.
We will probably need the balancer too, but that can wait for now.
Other undocumented changes (shame,shame) in proxy_util.c

Submitted by: mturk


Revision 104599 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:39:02 2004 UTC (20 years, 8 months ago) by wrowe
File length: 54667 byte(s)
Diff to previous 104598 (colored)
Added close_on_recycle flags for creatin connections.
This flag enables to distinguish between connection types.
Also added a pool cleanup bound to connection pool that recycles
the connection when client disconnects from server.

Submitted by: mturk


Revision 104598 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:37:08 2004 UTC (20 years, 8 months ago) by wrowe
File length: 53499 byte(s)
Diff to previous 104597 (colored)
Added acquire and release connection functions.
The acquire pulls the connection from the pool.
The release returns the connection to the pool.

Submitted by: mturk


Revision 104597 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:36:28 2004 UTC (20 years, 8 months ago) by wrowe
File length: 52946 byte(s)
Diff to previous 104595 (colored)
Added ap_proxy_connection_create function that makes
conn_rec for opened connection. It is used bt http(s) and ftp for
bounding the backend connection to client connection with the same id's.

Submitted by: mturk


Revision 104595 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:34:26 2004 UTC (20 years, 8 months ago) by wrowe
File length: 50626 byte(s)
Diff to previous 104593 (colored)
Add ap_proxy_connect_backend that will replace
ap_proxy_connect_to_backend. It uses worker params for setting socket
options and checks for conection's connect status.
It works both on empty and acquired connections.

Submitted by: mturk


Revision 104593 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:32:22 2004 UTC (20 years, 8 months ago) by wrowe
File length: 46923 byte(s)
Diff to previous 104591 (colored)
Change the way the prefork connection is created.
Use the same constructor as for theaded mpm's.
Added API's for destroying and closing connections

Submitted by: mturk


Revision 104591 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:30:06 2004 UTC (20 years, 8 months ago) by wrowe
File length: 46339 byte(s)
Diff to previous 104590 (colored)
Added acquire timeout for obtaining resources from reslist.
The timeout is in milliseconds to enable quick return in case the
reslist is exceded the maximum number of connections.

Submitted by: mturk


Revision 104590 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:28:59 2004 UTC (20 years, 8 months ago) by wrowe
File length: 45423 byte(s)
Diff to previous 104589 (colored)
Remove proxy_mdule_conf.
We will change the scheme hook api to include the worker.

Submitted by: mturk


Revision 104589 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:27:34 2004 UTC (20 years, 8 months ago) by wrowe
File length: 45480 byte(s)
Diff to previous 104587 (colored)
Remove proxy_conn struct and add it's params to proxy_conn_rec.
Use named structure type declarations.

Submitted by: mturk


Revision 104587 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:15:23 2004 UTC (20 years, 8 months ago) by wrowe
File length: 45515 byte(s)
Diff to previous 104586 (colored)
Use the worker pool for creating proxy_conn_poll to suppress it's
destruction when cleaning worker.

Submitted by: mturk


Revision 104586 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:14:49 2004 UTC (20 years, 8 months ago) by wrowe
File length: 45032 byte(s)
Diff to previous 104585 (colored)
Arrange the handling of apr_array_header_t arrays.

Submitted by: jfclere


Revision 104585 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:13:50 2004 UTC (20 years, 8 months ago) by wrowe
File length: 45002 byte(s)
Diff to previous 104584 (colored)
Make proxy_conn always accesible for preforked MPM and
APR_HAS_THREADS enabled.

Add init_conn_worker for creating apr_reslist that maintains connection
pool. For prefork mpm's use the single connection container.

Submitted by: mturk


Revision 104584 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:12:02 2004 UTC (20 years, 8 months ago) by wrowe
File length: 44098 byte(s)
Diff to previous 104582 (colored)
Add some source comments about worker DNS lookup.

Submitted by: mturk


Revision 104582 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:05:20 2004 UTC (20 years, 8 months ago) by wrowe
File length: 43953 byte(s)
Diff to previous 104578 (colored)
Added ap_proxy_determine_connection.
It will be used both for http and ajp handlers.
Started writing apr_reslist connection pool.

Submitted by: mturk


Revision 104578 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 22:00:47 2004 UTC (20 years, 8 months ago) by wrowe
File length: 39344 byte(s)
Diff to previous 104575 (colored)
Add ap_proxy_pre_request API function.
It calls the actual module pre_request hook if present

Submitted by: mturk


Revision 104575 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 21:49:40 2004 UTC (20 years, 8 months ago) by wrowe
File length: 38053 byte(s)
Diff to previous 104574 (colored)
Make sure that APR_MAJOR_VERSION is defined.

Submitted by: jfclere


Revision 104574 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 21:46:54 2004 UTC (20 years, 8 months ago) by wrowe
File length: 38028 byte(s)
Diff to previous 104573 (colored)
Remove all worker/balancer API's to proxy_util.

Submitted by: mturk


Revision 104573 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 11 21:45:53 2004 UTC (20 years, 8 months ago) by wrowe
File length: 31494 byte(s)
Diff to previous 104070 (colored)
  Missed a 2.0-HEAD proxy back-compat patch


Revision 104070 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 29 06:37:21 2004 UTC (20 years, 9 months ago) by niq
File length: 31384 byte(s)
Diff to previous 103698 (colored)
Fix for multiple proxy bugs - review please:

#10722  Reverse proxying cookies
#15207  Proxy passing canonicalised URIs to backend
#16812  Case-insensitivity of proxypassreverse
#19317  Canonicalised URI causing infinite loop
#20372  AllowEncodedSlashes
May also fix 13577 (untested)

This is really two fixes: 10722 and 15207; the others are trivial consequences.
To make review easier, the simpler fix (#15207) is entirely contained in
#ifdef FIX_15207 (new code) and
#ifndef FIX_15207 (removed code)


Revision 103698 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 19 13:30:14 2004 UTC (20 years, 11 months ago) by trawick
File length: 35169 byte(s)
Diff to previous 102618 (colored)
Fix handling of IPv6 numeric strings in mod_proxy.

(Some such operations would work if port was specified
in url due to way parsing was performed, finding last ':'
and considering everything after as the port.)


Revision 102618 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 9 20:31:03 2004 UTC (21 years, 2 months ago) by nd
File length: 35561 byte(s)
Diff to previous 102572 (colored)
fix name of The Apache Software Foundation


Revision 102572 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 8 12:27:14 2004 UTC (21 years, 2 months ago) by nd
File length: 35557 byte(s)
Diff to previous 102525 (colored)
fix copyright dates according to the first check in


Revision 102525 - (view) (download) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (21 years, 2 months ago) by nd
File length: 35557 byte(s)
Diff to previous 102135 (colored)
apply Apache License, Version 2.0


Revision 102135 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (21 years, 3 months ago) by nd
File length: 37776 byte(s)
Diff to previous 101154 (colored)
update license to 2004.


Revision 101154 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 3 19:27:12 2003 UTC (21 years, 7 months ago) by trawick
File length: 37776 byte(s)
Diff to previous 99363 (colored)
switch to APR 1.0 API (which is still in flux)

because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


Revision 99363 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 15 16:01:02 2003 UTC (22 years ago) by minfrin
File length: 37766 byte(s)
Diff to previous 98573 (colored)
Fixed a segfault when multiple ProxyBlock directives were used.
PR:		19023
Obtained from:
Submitted by:	Sami Tikka <sami.tikka@f-secure.com>
Reviewed by:


Revision 98573 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (22 years, 2 months ago) by nd
File length: 37687 byte(s)
Diff to previous 97202 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))


Revision 97202 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 14 14:11:24 2002 UTC (22 years, 6 months ago) by jim
File length: 37687 byte(s)
Diff to previous 96528 (colored)
Haven't heard any vetoes regarding this, so might as well fold it
in. Not too happy about cluttering up the list of directives either.
But, at least, it allows 2.0 to proxy stupid IIS as much as 1.3.
Docs to come soon.
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 96528 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 25 20:40:11 2002 UTC (22 years, 7 months ago) by ianh
File length: 36319 byte(s)
Diff to previous 96057 (colored)
make the output XHTML
Submitted by : Erik Abele <erik@codefaktor.de>


Revision 96057 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 15 08:05:11 2002 UTC (22 years, 9 months ago) by wrowe
File length: 36315 byte(s)
Diff to previous 96055 (colored)
  http occurances to update for apr_socket_opt_get/set


Revision 96055 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 15 07:46:19 2002 UTC (22 years, 9 months ago) by wrowe
File length: 36303 byte(s)
Diff to previous 95993 (colored)
  Timeout/time fixes


Revision 95993 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 10 06:01:14 2002 UTC (22 years, 9 months ago) by orlikowski
File length: 36332 byte(s)
Diff to previous 95854 (colored)
Continue the Bill Rowe apr_size_t crusade.


Revision 95854 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 23 06:06:25 2002 UTC (22 years, 10 months ago) by wrowe
File length: 36328 byte(s)
Diff to previous 95674 (colored)
  No crutches, people!


Revision 95674 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jun 14 17:14:57 2002 UTC (22 years, 10 months ago) by wrowe
File length: 36321 byte(s)
Diff to previous 95623 (colored)
  Cleanup proxy timeouts a bit to remove emits and make consistent to
  vhost timeout.


Revision 95623 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 12 23:59:31 2002 UTC (22 years, 10 months ago) by wrowe
File length: 36311 byte(s)
Diff to previous 95150 (colored)
  Solve the 80/20 by initializing and storing server_rec->timeout and
  server_rec->keep_alive_timeout in apr_time_interval_t format (in apr
  units, whatever they be), as both values exist to pass into APR, and
  all APR timeouts are in apr_time_t.

Reviewed by:	Cliff Woolley


Revision 95150 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 17 11:24:17 2002 UTC (22 years, 11 months ago) by trawick
File length: 36421 byte(s)
Diff to previous 94808 (colored)
stop using APLOG_NOERRNO in calls to ap_log_[pr]error()


Revision 94808 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 25 22:12:51 2002 UTC (23 years ago) by trawick
File length: 36805 byte(s)
Diff to previous 94501 (colored)
get mod_proxy to build on EBCDIC machines


Revision 94501 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 6 12:43:47 2002 UTC (23 years ago) by minfrin
File length: 36177 byte(s)
Diff to previous 94383 (colored)
Quick fix to an incorrect comment.
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 94383 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 2 04:30:49 2002 UTC (23 years ago) by dougm
File length: 36156 byte(s)
Diff to previous 94142 (colored)
PR:
Obtained from:
Submitted by:
Reviewed by:	Ryan Bloom
remove call to ap_proxy_reset_output_filters() and the function itself.
this call breaks ssl proxy when the client is using keepalives.
this function is also no longer needed with recent-ish filter changes.


Revision 94142 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 22 21:41:14 2002 UTC (23 years, 1 month ago) by trawick
File length: 36661 byte(s)
Diff to previous 94083 (colored)
fix some abuse of apr_port_t (flagged by Sun WorkShop)


Revision 94083 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 21 12:05:45 2002 UTC (23 years, 1 month ago) by minfrin
File length: 36619 byte(s)
Diff to previous 93918 (colored)
Change the header merging behaviour in proxy, as some headers
(like Set-Cookie) cannot be unmerged due to stray commas in
dates.
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 93918 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (23 years, 1 month ago) by fielding
File length: 36521 byte(s)
Diff to previous 93787 (colored)
Update our copyright for this year.


Revision 93787 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 8 02:03:47 2002 UTC (23 years, 1 month ago) by trawick
File length: 36521 byte(s)
Diff to previous 93752 (colored)
implement a common function for getting a socket and trying to connect
to the target host; use that common function for proxy HTTP and proxy
CONNECT

In that new function, fix this problem:

     Proxy HTTP and CONNECT: Keep trying other addresses from the DNS
     when we can't get a socket in the specified address family.  We may
     have gotten back an IPv6 address first and yet our system is not
     configured to allow IPv6 sockets.

An example host is www.ipv6.org.  The first address I get back is
an IPv6 address, but my machine may not be configured to allow an
AF_INET6 socket.

Before the fix: The apr_socket() failure was fatal.
After the fix:  When apr_socket() fails, we go to the next address from
                the resolver, successfully create a socket in the
                specified family (AF_INET), and all is well.

(an unrelated fix in this commit was to pass a server_rec in a broken
ap_log_error() call)


Revision 93752 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 7 06:07:25 2002 UTC (23 years, 1 month ago) by rbb
File length: 33467 byte(s)
Diff to previous 93529 (colored)
We need to setup protocol filters for the fake request.  If we don't,
then when any request filters are added, the connection filters will be
lost.  This fixes the proxy.


Revision 93529 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 21 11:42:03 2002 UTC (23 years, 2 months ago) by trawick
File length: 33366 byte(s)
Diff to previous 93527 (colored)
fix the linkage of and add a prototype for ap_proxy_table_unmerge()


Revision 93527 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 21 06:06:31 2002 UTC (23 years, 2 months ago) by minfrin
File length: 33351 byte(s)
Diff to previous 93093 (colored)
Some browsers ignore cookies that have been merged into a
single Set-Cookie header. Set-Cookie and Set-Cookie2 headers
are now unmerged in the http proxy before being sent to the
client.
Fix a problem with proxy where each entry of a duplicated
header such as Set-Cookie would overwrite and obliterate the
previous value of the header, resulting in multiple header
values (like cookies) going missing.
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 93093 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 30 04:34:11 2002 UTC (23 years, 2 months ago) by stoddard
File length: 32572 byte(s)
Diff to previous 93014 (colored)
Cleanup some fallout from the recent install_transport_filters commit.
Deprecate ap_proxy_pre_http_connection.


Revision 93014 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 25 01:11:47 2002 UTC (23 years, 2 months ago) by jerenkrantz
File length: 32752 byte(s)
Diff to previous 92928 (colored)
Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.
If you need the length, you should be using apr_brigade_length.  This is
much more consistent.  Of all the places that call ap_get_brigade, only
one (ap_http_filter) needs the length.  This makes it now possible to
pass constants down without assigning them to a temporary variable first.

Also:
- Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before)
- Fix buglet in mod_ssl that would cause it to return too much data in
  some circumstances


Revision 92928 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 19 07:45:18 2002 UTC (23 years, 3 months ago) by jerenkrantz
File length: 32799 byte(s)
Diff to previous 92722 (colored)
Input filtering prototype change: Socket blocking type should be
separate from the input filter mode type.

We also no longer look at readbytes to determine the method of
filter operation.  This makes the use of filters more obvious and
allows a wider range of options for input filters modes.

To start with, the new input filter modes are:

AP_MODE_READBYTES (no more than *readbytes returned)
AP_MODE_GETLINE (old *readbytes == 0 case)
AP_MODE_EATCRLF (old AP_MODE_PEEK)
AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite)
AP_MODE_EXHAUSTIVE (old *readbytes == -1 case)
AP_MODE_INIT (special case for NNTP over SSL)

The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ

This also allows cleanup of mod_ssl's handling in the getline case.

Reviewed by:	Ryan Bloom (concept), Greg Stein (concept)


Revision 92722 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 3 19:20:54 2002 UTC (23 years, 3 months ago) by stoddard
File length: 32737 byte(s)
Diff to previous 92704 (colored)
Fix seg fault in HTTP_IN when trying to handle the LimitRequestBody
directive when reading a proxy response. We should bypass LimitRequestBody
activities when handling a response from the proxied server.

I don't think this will circumvent requestbody checking on a large request
coming into the server that is destined to be proxied. (not tested though).


Revision 92704 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 2 19:12:40 2002 UTC (23 years, 3 months ago) by stoddard
File length: 32705 byte(s)
Diff to previous 92690 (colored)
Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems
to be a bit more descriptive. Move the check to inside the inner while()
loop and add an additional check for eos. If we get an EOS bucket, there
is no point in going further. Hopefully this will fix the last seg fault
in the function.


Revision 92690 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 31 20:43:59 2001 UTC (23 years, 3 months ago) by stoddard
File length: 32676 byte(s)
Diff to previous 92651 (colored)
Eliminate loop in ap_proxy_string_read(). Need to be able to handle
getting an empty brigade from ap_get_brigade(). Also made sure that
we always call ap_get_brigade() in readline mode.

Submitted/Reviewed by: Adam Sussman & Bill Stoddard


Revision 92651 - (view) (download) (annotate) - [select for diffs]
Modified Sat Dec 29 20:32:52 2001 UTC (23 years, 3 months ago) by stoddard
File length: 32135 byte(s)
Diff to previous 92226 (colored)
Detabify some functions. No functional change.


Revision 92226 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 28 21:07:32 2001 UTC (23 years, 4 months ago) by ianh
File length: 31408 byte(s)
Diff to previous 91489 (colored)
make the proxy code spit out an error to the error log.
This bit me when I included a 11th file no error message, nothing.


Revision 91489 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 16 14:45:56 2001 UTC (23 years, 6 months ago) by wrowe
File length: 31297 byte(s)
Diff to previous 91486 (colored)
  Hmmm... mismatched namespaces :-?


Revision 91486 - (view) (download) (annotate) - [select for diffs]
Modified Tue Oct 16 05:18:39 2001 UTC (23 years, 6 months ago) by rbb
File length: 31294 byte(s)
Diff to previous 91370 (colored)
Cleanup the proxy code that creates a request to the origin
server.  This change adds an optional hook, which allows modules
to gain control while the request is created if the proxy module
is loaded.  The purpose of this hook is to allow modules to add
input and/or output filters to the request to the origin.  While
I was at it, I made the core use this hook, so that proxy request
creation uses some of the code from the core.  This can still be
greatly improved, but this is a good start.


Revision 91370 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 8 21:49:17 2001 UTC (23 years, 6 months ago) by ianh
File length: 31340 byte(s)
Diff to previous 91363 (colored)
dechunking filter removed.
add HTTP_IN filter after the headers have been parsed.
so that the HTTP_IN can check them ;-)
Still not 100% if this works properly, but I don't get
the chunking numbers displayed on my browser,
so it's better than what was there.
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 91363 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 8 19:25:35 2001 UTC (23 years, 6 months ago) by ianh
File length: 31427 byte(s)
Diff to previous 90011 (colored)
initial port of new Request-mode HTTP_IN filter to proxy.
Status: It serves a reverse-proxy page.. but SLOWLY.
VERY SLOWLY.
still looking at why, but now it serves pages instead of dumping core.
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 90011 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 7 21:18:03 2001 UTC (23 years, 8 months ago) by ianh
File length: 31201 byte(s)
Diff to previous 89855 (colored)
change the parameter to ap_get_brigade from apr_site_t to apr_off_t, due to
a parameter change in the original filter.
PR:
Submitted by: barbee@veribox.net
Reviewed by: ianh@apache.org


Revision 89855 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 1 05:50:29 2001 UTC (23 years, 8 months ago) by orlikowski
File length: 31202 byte(s)
Diff to previous 89838 (colored)
inet_addr and inet_network are not interchangable.
Furthermore, use apr_inet_addr, rather than ap_inet_addr (though they map
to the same thing).


Revision 89838 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 31 19:19:34 2001 UTC (23 years, 8 months ago) by orlikowski
File length: 31365 byte(s)
Diff to previous 89837 (colored)
After checking what this does with Bill Rowe, and discovering it to be dead
wood, I am tossing it.


Revision 89837 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 31 19:12:56 2001 UTC (23 years, 8 months ago) by orlikowski
File length: 31888 byte(s)
Diff to previous 89829 (colored)
Being slightly picky: properly namespace protect make_fake_req()


Revision 89829 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 31 16:25:18 2001 UTC (23 years, 8 months ago) by orlikowski
File length: 31879 byte(s)
Diff to previous 89473 (colored)
Nobody screamed. ;)
This gets rid of ap_proxy_host2addr, and a few other useless functions,
and allows us to be threadsafe when doing DNS resolution.


Revision 89473 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 28 12:48:57 2001 UTC (23 years, 9 months ago) by chuck
File length: 34734 byte(s)
Diff to previous 89471 (colored)
Reorganize ap_proxy_string_read() internally to not process eos buckets.


Revision 89471 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 28 07:05:18 2001 UTC (23 years, 9 months ago) by orlikowski
File length: 34546 byte(s)
Diff to previous 89280 (colored)
An EOS bucket doesn't contain anything, so why shouldn't we skip it?


Revision 89280 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 6 21:51:58 2001 UTC (23 years, 10 months ago) by chuck
File length: 34534 byte(s)
Diff to previous 89085 (colored)
Use apr-util's date functions now


Revision 89085 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 11 17:32:41 2001 UTC (23 years, 11 months ago) by ianh
File length: 34528 byte(s)
Diff to previous 89044 (colored)
Allows Mod_proxy to be dynamically loaded on win32 systems
PR:
Obtained from:
Submitted by:	ianh
Reviewed by:	Chuck Murcko, Graham


Revision 89044 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 7 02:47:51 2001 UTC (23 years, 11 months ago) by chuck
File length: 34213 byte(s)
Diff to previous 89037 (colored)
Crikey.


Revision 89037 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 6 10:59:22 2001 UTC (23 years, 11 months ago) by chuck
File length: 34212 byte(s)
Diff to previous 88927 (colored)
Track Greg's change to byte count for input filters


Revision 88927 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 24 04:38:53 2001 UTC (24 years ago) by minfrin
File length: 34213 byte(s)
Diff to previous 88926 (colored)
Made the variable naming the same as everywhere else in Apache for the
ap_get_brigade() fix.
PR:
Obtained from:
Reviewed by:


Revision 88926 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 24 02:50:19 2001 UTC (24 years ago) by orlikowski
File length: 34178 byte(s)
Diff to previous 88922 (colored)
Just for the sake of cleanliness ...


Revision 88922 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 23 21:03:39 2001 UTC (24 years ago) by minfrin
File length: 34149 byte(s)
Diff to previous 88854 (colored)
Apply changes to ap_get_brigade() to the proxy code.
PR:
Obtained from:
Reviewed by:


Revision 88854 - (view) (download) (annotate) - [select for diffs]
Modified Sat Apr 14 07:03:00 2001 UTC (24 years ago) by minfrin
File length: 34176 byte(s)
Diff to previous 88817 (colored)
Make hooks work for the *_canon() functions. Work continues.
PR:
Obtained from:
Reviewed by:


Revision 88817 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 12 01:57:48 2001 UTC (24 years ago) by minfrin
File length: 34155 byte(s)
Diff to previous 88797 (colored)
FTP directory filter works now.
Many FIXME notes added.
Much overhauling of proxy_ftp.c
PR:
Obtained from:
Reviewed by:


Revision 88797 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 10 20:44:16 2001 UTC (24 years ago) by minfrin
File length: 34073 byte(s)
Diff to previous 88793 (colored)
Make sure the filter stack in a reused downstream connection is reset
so we don't get lots of DECHUNK filters when we don't want them.
PR:
Obtained from:
Reviewed by:


Revision 88793 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 10 19:52:40 2001 UTC (24 years ago) by minfrin
File length: 33583 byte(s)
Diff to previous 88777 (colored)
We now keep the entire conn_rec across downstream keepalives, not
just the socket.
Made the "keepalive mismatch" message more accurate.
PR:
Obtained from:
Reviewed by:


Revision 88777 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 10 00:13:56 2001 UTC (24 years ago) by minfrin
File length: 33585 byte(s)
Diff to previous 88740 (colored)
Compiler warnings - yuck!
Moved ap_proxy_string_read() to proxy_util.c so it can be used by
proxy_http.c
PR:
Obtained from:
Reviewed by:


Revision 88740 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 6 14:25:54 2001 UTC (24 years ago) by minfrin
File length: 32378 byte(s)
Diff to previous 88739 (colored)
Bugfixes to proxy_ftp.c -> in some places uri_addr was used instead
of connect_addr - all hail cut and paste!
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 88739 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 6 10:44:08 2001 UTC (24 years ago) by minfrin
File length: 32371 byte(s)
Diff to previous 88732 (colored)
Converted send_dir() to ap_proxy_send_dir_filter() in proxy_ftp.c.
Fixed up the header files
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 88732 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 5 18:53:04 2001 UTC (24 years ago) by minfrin
File length: 32605 byte(s)
Diff to previous 88721 (colored)
Cleanup of dead functions within proxy_util.c.
PR:
Obtained from:
Reviewed by:


Revision 88721 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 4 18:47:42 2001 UTC (24 years ago) by minfrin
File length: 34348 byte(s)
Diff to previous 88648 (colored)
Some code rewriting in ap_proxy_connect_handler():
*) Fixed bug where a hostname without a "." in it (such as "localhost")
would not trigger an IP address check with ProxyBlock.
*) Fixed ProxyBlock bugs with ap_proxy_http_handler() and
ap_proxy_connect_handler().
*) Updated ap_proxy_connect_handler() to support APR, while
moving some common code between http_handler and connect_handler
to proxy_util.c.
PR:
Obtained from:
Reviewed by:


Revision 88648 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 2 17:04:19 2001 UTC (24 years ago) by minfrin
File length: 32760 byte(s)
Diff to previous 88534 (colored)
  *) Added support for downstream keepalives in mod_proxy.
  *) Changed mod_proxy ap_proxy_http_handler() to support APR properly.
PR:
Obtained from:
Reviewed by:


Revision 88534 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 19 08:54:41 2001 UTC (24 years, 1 month ago) by chuck
File length: 31880 byte(s)
Diff to previous 88525 (colored)
reorganize STATUS; update copyright


Revision 88525 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 16 05:49:51 2001 UTC (24 years, 1 month ago) by chuck
File length: 31875 byte(s)
Diff to previous 88518 (colored)
change INADDR_NONE to APR_INADDR_NONE
Submitted by:	Ian Holsman <IanH@cnet.com>
Reviewed by:	Chuck Murcko


Revision 88518 - (view) (download) (annotate) - [select for diffs]
Modified Wed Mar 14 21:16:41 2001 UTC (24 years, 1 month ago) by minfrin
File length: 31871 byte(s)
Diff to previous 88487 (colored)
Pull in the Connection handling part of the v1.3 patch for HTTP/1.1.
Some preliminary HTTP/1.1 work
Some comments and fixes
PR:
Obtained from:
Reviewed by:


Revision 88487 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 11 10:42:14 2001 UTC (24 years, 1 month ago) by chuck
File length: 31867 byte(s)
Diff to previous 88077 (colored)
Cache removed, with other spooge
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 88077 - (view) (download) (annotate) - [select for diffs]
Modified Sun Feb 11 00:12:43 2001 UTC (24 years, 2 months ago) by rbb
File length: 39519 byte(s)
Diff to previous 88019 (colored)
Fix any compile breaks after moving apr_snprintf and apr_vsnprintf to
apr_strings.h


Revision 88019 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 8 07:45:33 2001 UTC (24 years, 2 months ago) by dougm
File length: 39494 byte(s)
Diff to previous 88004 (colored)
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 88004 - (view) (download) (annotate) - [select for diffs]
Modified Wed Feb 7 05:41:35 2001 UTC (24 years, 2 months ago) by chuck
File length: 39472 byte(s)
Diff to previous 87935 (colored)
Changes to get running on the current codebase
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 87935 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 31 23:11:05 2001 UTC (24 years, 2 months ago) by wrowe
File length: 39446 byte(s)
Diff to previous 87760 (colored)
  Fix the remaining APR_FINFO_NORM occurances.  Again, followup is needed
  to actually test any field outside the scope of APR_FINFO_MIN.


Revision 87760 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jan 20 21:42:23 2001 UTC (24 years, 3 months ago) by wrowe
File length: 39447 byte(s)
Diff to previous 87731 (colored)
  The changes required for the APR_FINFO_wanted argument to
  apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


Revision 87731 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 19 07:04:36 2001 UTC (24 years, 3 months ago) by wrowe
File length: 39431 byte(s)
Diff to previous 87460 (colored)
  The big change.  This is part 3 of the apr-util symbols rename, please
  see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


Revision 87460 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 20 16:44:01 2000 UTC (24 years, 4 months ago) by trawick
File length: 39430 byte(s)
Diff to previous 87424 (colored)
Switch to the APR-provided APR_CHARSET_EBCDIC feature test macro.


Revision 87424 - (view) (download) (annotate) - [select for diffs]
Modified Tue Dec 19 17:05:48 2000 UTC (24 years, 4 months ago) by rbb
File length: 39432 byte(s)
Diff to previous 87399 (colored)
Force all Apache functions to be linked into the executable, whether they
are used or not.  This uses the same mechanism that is used for APR
and APR-util.  This may not be the correct solution, but it works, and that
is what I really care about.  This also renames CHARSET_EBCDIC to
AP_CHARSET_EBCDIC.  This is for namespace correctness, but it also makes
the exports script a bit easier.


Revision 87399 - (view) (download) (annotate) - [select for diffs]
Modified Mon Dec 18 17:52:05 2000 UTC (24 years, 4 months ago) by trawick
File length: 39411 byte(s)
Diff to previous 87034 (colored)
API routines ap_pgethostbyname() and ap_pduphostent() are no longer
available.  Use apr_getaddrinfo() instead.

The ap_pduphostent() code was moved to modules/proxy/proxy_util.c for
now since that is the only caller.  When the proxy's use of the
resolver is APR-ized this won't be needed anymore.


Revision 87034 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 20 18:10:19 2000 UTC (24 years, 5 months ago) by chuck
File length: 37876 byte(s)
Diff to previous 87001 (colored)
Restore Ryan's original intent in ap_proxy_doconnect() return value check


Revision 87001 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 18 03:17:21 2000 UTC (24 years, 5 months ago) by rbb
File length: 37875 byte(s)
Diff to previous 86994 (colored)
More proxy fixes.  There are still some bugs in this code, but this has
successfully proxied www.yahoo.com and www.ntrnet.net among other test
sites that I chose at random.


Revision 86994 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 17 17:26:32 2000 UTC (24 years, 5 months ago) by chuck
File length: 37887 byte(s)
Diff to previous 86990 (colored)
fix apr_getaddrinfo() call


Revision 86990 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 17 03:45:02 2000 UTC (24 years, 5 months ago) by trawick
File length: 37884 byte(s)
Diff to previous 86988 (colored)
APR: Change apr_connect() to take apr_sockaddr_t instead of hostname.
Add generic apr_create_socket().  Add apr_getaddrinfo() for doing
hostname resolution/address string parsing and building
apr_sockaddr_t.
Submitted by:	David Reid
Reviewed by:	Jeff Trawick


Revision 86988 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 17 00:19:30 2000 UTC (24 years, 5 months ago) by rbb
File length: 38062 byte(s)
Diff to previous 86978 (colored)
This removes all BUFF's from the HTTP proxy.  This code is relatively
ugly, but it does proxy pages.  This even fixes the content-type bug
that I introduced yesterday sometime.  As soon as BUFF is removed from
the FTP proxy, the buff.c and buff.h files need to go away.


Revision 86978 - (view) (download) (annotate) - [select for diffs]
Modified Thu Nov 16 01:57:46 2000 UTC (24 years, 5 months ago) by rbb
File length: 39137 byte(s)
Diff to previous 86961 (colored)
Make the proxy work with filters.  We are still using BUFF for the
back-end communication, but BUFF has been removed from the communication
with the client.  The headers are not working correctly yet, but we are
making progress.  The most important part of this commit is that we are
able to actually filter data coming from the proxy.


Revision 86961 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 14 17:15:11 2000 UTC (24 years, 5 months ago) by chuck
File length: 39335 byte(s)
Diff to previous 86928 (colored)
Simplify ap_proxy_doconnect(); now returns apr_status_t
PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 86928 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 11 18:34:10 2000 UTC (24 years, 5 months ago) by rbb
File length: 39423 byte(s)
Diff to previous 86927 (colored)
The whole proxy compiles cleanly now.  Now we need to make it actually work
again, but at least we are making progress.


Revision 86927 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 11 18:13:04 2000 UTC (24 years, 5 months ago) by rbb
File length: 38994 byte(s)
Diff to previous 86923 (colored)
proxy_ftp and proxy_http both compile now.  Not tested because the rest of
the proxy is still not compiling, but we are making progress.


Revision 86923 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 11 11:07:03 2000 UTC (24 years, 5 months ago) by chuck
File length: 38962 byte(s)
Diff to previous 86919 (colored)
This is the 1.3.x current proxy into 2.0 - first stage
PR:
Obtained from: Sam Magnuson
Submitted by:  Chuck Murcko
Reviewed by:


Revision 86919 - (view) (download) (annotate) - [select for diffs]
Modified Sat Nov 11 06:06:00 2000 UTC (24 years, 5 months ago) by rbb
File length: 39404 byte(s)
Diff to previous 86450 (colored)
Not all platforms have INADDR_NONE defined by default.  Apache used to
check for this and the define it if needed.  Since APR also needs this
check it makes more sense for APR to just check and export a symobl that
is always available.
Submitted by:	Branko �ibej <brane@xbc.nu>
Reviewed by:	Ryan Bloom


Revision 86450 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 8 06:05:22 2000 UTC (24 years, 6 months ago) by wrowe
File length: 39400 byte(s)
Diff to previous 86440 (colored)
  Missed it, a rather messy canonical error example.


Revision 86440 - (view) (download) (annotate) - [select for diffs]
Modified Sun Oct 8 03:23:05 2000 UTC (24 years, 6 months ago) by rbb
File length: 39377 byte(s)
Diff to previous 86008 (colored)
Remove all compiler warnings from the proxy code.  There are no garauntees
that this still works, but most of the changes were just const-safeness
changes.
PR:	6631


Revision 86008 - (view) (download) (annotate) - [select for diffs]
Modified Sun Aug 6 06:07:53 2000 UTC (24 years, 8 months ago) by wrowe
File length: 39006 byte(s)
Diff to previous 85976 (colored)
  Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
  see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 85976 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 2 05:27:38 2000 UTC (24 years, 8 months ago) by dougm
File length: 38976 byte(s)
Diff to previous 85878 (colored)
prefix libapr functions and types with apr_


Revision 85878 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jul 25 01:06:32 2000 UTC (24 years, 9 months ago) by wrowe
File length: 38940 byte(s)
Diff to previous 85563 (colored)
  Add APR_EOL_STR for a platform specific text delimiter, provided by
  apr.h (defined in apr.h.in and apr.hw).  This is needed -only- in APR
  created files (true raw files) such as logs.  It is not required in any
  splat to screen (stderr/stdout) formatting, nor any html markup.

  Some other modules slipped through in the prior apr_strings.h commit.
  Sorry 'bout that.

PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 85563 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 13 06:17:47 2000 UTC (24 years, 10 months ago) by chuck
File length: 38942 byte(s)
Diff to previous 85552 (colored)
fixups for remaining current warnings

Submitted by:	Chuck Murcko


Revision 85552 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jun 12 21:41:58 2000 UTC (24 years, 10 months ago) by chuck
File length: 39060 byte(s)
Diff to previous 85081 (colored)
New mod_proxy/mod_cache (file cache) for 2.0. This uses a caching API so
that shared mem, LDAP servers, DBs, etc. can also be used for proxy
caching. The caching API is very young, and subject to change as APR changes.

proxy_cache.c from the proxy subdir is no longer used.

Build with --enable-modules=proxy,cache

Lightly tested on Linux, no warranties expressed or implied yet.

Still to do:

strerror(), waitpid(), stat() cleanups
address issues marked by @@@FIXME
add HTTP/1.1

This should be considered a *reference* proxy implementation for 2.0. What
actually ends up shipping with 2.0 is likely going to be rather different as
the redesign evolves. This may end up being the 2.0 backwards compatibility
workalike.

Modified to work with today's conf/build/layout scheme

PR:
Obtained from:
Submitted by:	Sam Magnuson
Reviewed by:	Chuck Murcko


Revision 85081 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 28 18:27:55 2000 UTC (24 years, 11 months ago) by dougm
File length: 38227 byte(s)
Diff to previous 85074 (colored)
back out APR_ prefix for TRUE,FALSE


Revision 85074 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 28 06:49:53 2000 UTC (24 years, 11 months ago) by dougm
File length: 38259 byte(s)
Diff to previous 85017 (colored)
prefix TRUE,FALSE with APR_


Revision 85017 - (view) (download) (annotate) - [select for diffs]
Modified Sun Apr 23 02:32:58 2000 UTC (25 years ago) by fielding
File length: 38227 byte(s)
Diff to previous 84963 (colored)
Finished move of ap_md5 routines to apr_md5.  Removed ap_md5.h.
Replaced more magic numbers with MD5_DIGESTSIZE.  Yuck.

Submitted by:	William Rowe, Roy Fielding


Revision 84963 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 14 15:59:20 2000 UTC (25 years ago) by rbb
File length: 38198 byte(s)
Diff to previous 84879 (colored)
Change ap_context_t to ap_pool_t.  This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.


Revision 84879 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 31 09:05:25 2000 UTC (25 years ago) by fielding
File length: 38219 byte(s)
Diff to previous 84751 (colored)
Update to Apache Software License version 1.1


Revision 84751 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 13 20:27:29 2000 UTC (25 years, 1 month ago) by jim
File length: 38364 byte(s)
Diff to previous 84725 (colored)
Backport the CSS security fixes to Apache 2.0a. Or is that forward
port? My sense of direction is all confused.

PR:
Obtained from:
Submitted by:
Reviewed by:


Revision 84725 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 10 00:07:37 2000 UTC (25 years, 1 month ago) by rbb
File length: 38235 byte(s)
Diff to previous 84135 (colored)
Fix all the License issues.  Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license


Revision 84135 - (view) (download) (annotate) - [select for diffs]
Modified Fri Nov 19 18:49:20 1999 UTC (25 years, 5 months ago) by rbb
File length: 38109 byte(s)
Diff to previous 83970 (colored)
Finish the conversion from fprintf(stderr -> ap_log_err.


Revision 83970 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 11 22:40:18 1999 UTC (25 years, 6 months ago) by martin
File length: 36833 byte(s)
Diff to previous 83859 (colored)
Remove most of the annoying "re ap_context_t mplement" mis-replacements
by what I think is their real meaning. Guys, I didn't verify all of this,
please have a close look at my "fixes". Thanks.


Revision 83859 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 31 21:54:52 1999 UTC (25 years, 7 months ago) by rbb
File length: 36857 byte(s)
Diff to previous 83852 (colored)
Fix all of those annoying --i -> - ap_context_t problems caused by a
search/replace gone wrong.


Revision 83852 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 31 05:35:52 1999 UTC (25 years, 7 months ago) by rbb
File length: 36881 byte(s)
Diff to previous 83769 (colored)
Changed pools to contexts.  Tested with prefork and pthread mpm's.  I'll
check this out tomorrow and make sure everything was checked in correctly.


Revision 83769 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 26 14:15:07 1999 UTC (25 years, 8 months ago) by fielding
File length: 36767 byte(s)
Diff to previous 83751 (colored)
Changes from pthreads.  Removes timeouts, adds mutex.
This probably breaks the proxy on everything but pthreads.

Submitted by:	Bill Stoddard


Revision 83751 - (view) (download) (annotate) - [select for diffs]
Added Tue Aug 24 06:55:44 1999 UTC (25 years, 8 months ago) by fielding
File length: 37415 byte(s)
Apache 1.3.9 baseline for the Apache 2.0 repository.

Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9
Submitted by: Apache Group


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26