We run apache 1.2.4 as a non-caching proxy for a couple of CGI scripts
that execute on a different server which we want to hide.

The apache proxy module uses a large buffer for all data returned by the
remote CGI. This is very undesirable in our case, since our data-source
is slow and data arrives in small increments.
Whith the standard apache set-up (including the proxy-module) the
browser client must wait a long time before anything is returned.

My request for change to the apache development team (mod_proxy/1166)
has been suspended.

To overcome this annoying limitation, I developed the following
quick patch to the source in src/modules/proxy.
Somebody else might find this useful :-)

Apache 1.3b2
------------------------------------------------------------------
*** proxy_util.c.orig   Fri Nov  7 18:11:35 1997
--- proxy_util.c        Mon Nov 10 09:23:37 1997
***************
*** 471,476 ****
--- 471,481 ----
            n -= w;
            o += w;
        }
+       /*
+        * [EMAIL PROTECTED] 10.11.97 I don't want excessive buffering !
+        */
+         if (!con->aborted)
+           bflush(con->client);
      }
      if (!con->aborted)
        bflush(con->client);
------------------------------------------------------------------

Apache 1.2.4
------------------------------------------------------------------
*** proxy_util.c.orig   Mon Nov 10 09:26:29 1997
--- proxy_util.c        Mon Nov 10 09:24:29 1997
***************
*** 427,432 ****
--- 427,437 ----
              n-=w;
              o+=w;
          }
+       /*
+        * [EMAIL PROTECTED] 10.11.97 I don't want excessive buffering !
+        */
+         if (!con->aborted)
+           bflush(con->client);
      }
      if (!con->aborted)
          bflush(con->client);
 
-----------------------------------------------------------------


-- Hermann H�ni
   ________    __ 
__________________________________________________________
  / ____/ /   / / / / ____/   GLUE Software Engineering AG
 / / __/ /   / / / / __/      Zieglerstr. 34,    CH-3007 Bern,   
Switzerland
/ /_/ / /___/ /_/ / /___      Phone: (+41)31-3853011     
Fax:(+41)31-3853018
\____/_____/\____/_____/______Email: [EMAIL PROTECTED] 
http://www.glue.ch/~hueni

Reply via email to