On Mon, 16 Aug 2004 12:16:02 +0200, jean-frederic clere <[EMAIL PROTECTED]> wrote:
Jeff Trawick wrote:
probably obvious to those doing the load balancing work, but just in case...
url in this case is ip:port, which ap_proxy_get_balancer() doesn't handle
simple working testcase in case this helps testing
connect and send "CONNECT 0.0.0.0:8080\r\n"
Do we need balancer for CONNECT?
I would think not. My understanding is that CONNECT is just a pipe, with no ability to keep connections open (e.g., in keepalive state) or re-use connections already opened.
Ok, the patch is quite easy in this case.
BTW: proxy_connect.c loops when the client closes the connection, I am preparing a patch for this problem.
Index: mod_proxy.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/mod_proxy.c,v
retrieving revision 1.130
diff -u -r1.130 mod_proxy.c
--- mod_proxy.c 13 Aug 2004 12:09:13 -0000 1.130
+++ mod_proxy.c 16 Aug 2004 11:13:35 -0000
@@ -611,8 +611,14 @@
/* Try to obtain the most suitable worker */
access_status = ap_proxy_pre_request(&worker, &balancer, r, conf, &url);
- if (access_status != OK)
+ if (access_status != OK && r->method_number != M_CONNECT) {
+#if DEBUGGING
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "NoWorker for %s (%s) %d",
+ r->uri, url, access_status);
+#endif
return access_status;
+ }
/* firstly, try a proxy, unless a NoProxy directive is active */
if (!direct_connect) {
