> Adding it to mod_proxy.h is right the thing.
> The idea is to have a ap_proxy_pre_request and ap_proxy_post_request:
> one called before "processing" the request and one after.

ok, cool.  attached is a new patch that addresses this.

sorry for the excess dialogue - this would have been obvious if I had
followed the code a bit :)

--Geoff
Index: modules/proxy/mod_proxy.h
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.h,v
retrieving revision 1.120
diff -u -r1.120 mod_proxy.h
--- modules/proxy/mod_proxy.h	11 Aug 2004 23:30:17 -0000	1.120
+++ modules/proxy/mod_proxy.h	18 Aug 2004 13:11:26 -0000
@@ -388,6 +388,7 @@
 PROXY_DECLARE(const char *) ap_proxy_add_balancer(proxy_balancer **balancer, apr_pool_t *p, proxy_server_conf *conf, const char *url);
 PROXY_DECLARE(void) ap_proxy_add_worker_to_balancer(apr_pool_t *pool, proxy_balancer *balancer, proxy_worker *worker);
 PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker, proxy_balancer **balancer, request_rec *r, proxy_server_conf *conf, char **url);
+PROXY_DECLARE(int) ap_proxy_post_request(proxy_worker *worker, proxy_balancer *balancer, request_rec *r, proxy_server_conf *conf);
 PROXY_DECLARE(int) ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, proxy_server_conf *conf, proxy_worker *worker, proxy_conn_rec *conn,
                                                  apr_pool_t *ppool, apr_uri_t *uri, char **url, const char *proxyname, apr_port_t proxyport,
                                                  char *server_portstr, int server_portstr_size);
Index: modules/proxy/proxy_ftp.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ftp.c,v
retrieving revision 1.145
diff -u -r1.145 proxy_ftp.c
--- modules/proxy/proxy_ftp.c	11 Aug 2004 23:28:58 -0000	1.145
+++ modules/proxy/proxy_ftp.c	18 Aug 2004 13:11:30 -0000
@@ -745,7 +745,8 @@
     return OK;
 }
 
-static ftp_proxyerror(request_rec *r, proxy_conn_rec *conn, int statuscode, const char *message)
+static
+int ftp_proxyerror(request_rec *r, proxy_conn_rec *conn, int statuscode, const char *message)
 {
     proxy_ftp_cleanup(r, conn);
     return ap_proxyerror(r, statuscode, message);
@@ -782,7 +783,6 @@
     int len, rc;
     int one = 1;
     char *size = NULL;
-    apr_socket_t *origin_sock = NULL;
     char xfer_type = 'A'; /* after ftp login, the default is ASCII */
     int  dirlisting = 0;
 #if defined(USE_MDTM) && (defined(HAVE_TIMEGM) || defined(HAVE_GMTOFF))
Index: modules/proxy/proxy_util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
retrieving revision 1.135
diff -u -r1.135 proxy_util.c
--- modules/proxy/proxy_util.c	13 Aug 2004 12:20:53 -0000	1.135
+++ modules/proxy/proxy_util.c	18 Aug 2004 13:11:34 -0000
@@ -19,6 +19,10 @@
 #include "scoreboard.h"
 #include "apr_version.h"
 
+#if APR_HAVE_UNISTD_H
+#include <unistd.h>         /* for getpid() */
+#endif
+
 #if (APR_MAJOR_VERSION < 1)
 #undef apr_socket_create
 #define apr_socket_create apr_socket_create_ex

Reply via email to