]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
initial port of new Request-mode HTTP_IN filter to proxy.
authorIan Holsman <ianh@apache.org>
Mon, 8 Oct 2001 19:25:35 +0000 (19:25 +0000)
committerIan Holsman <ianh@apache.org>
Mon, 8 Oct 2001 19:25:35 +0000 (19:25 +0000)
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:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91363 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.h
modules/proxy/proxy_ftp.c
modules/proxy/proxy_http.c
modules/proxy/proxy_util.c

index 91e661dbe7a26e7d002bef6069a1c332c957b6de..7aa95d45840e5f5c05f438bba979e7d5ae728339 100644 (file)
@@ -258,7 +258,8 @@ PROXY_DECLARE(int) ap_proxy_is_domainname(struct dirconn_entry *This, apr_pool_t
 PROXY_DECLARE(int) ap_proxy_is_hostname(struct dirconn_entry *This, apr_pool_t *p);
 PROXY_DECLARE(int) ap_proxy_is_word(struct dirconn_entry *This, apr_pool_t *p);
 PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf, apr_sockaddr_t *uri_addr);
-PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c, request_rec *r);
+PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c);
+PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r);
 PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb, char *buff, size_t bufflen, int *eos);
 PROXY_DECLARE(void) ap_proxy_reset_output_filters(conn_rec *c);
 
index b396c5f7d5607aca334de6c009648c2b0ad16b0a..1c505809e16429529a24cfb905c1fbfd77a7d2fb 100644 (file)
@@ -774,7 +774,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
      */
 
     /* set up the connection filters */
-    ap_proxy_pre_http_connection(origin, NULL);
+    ap_proxy_pre_http_connection(origin);
 
     /* possible results: */
     /*   120 Service ready in nnn minutes. */
@@ -1558,7 +1558,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
     }
 
     /* set up the connection filters */
-    ap_proxy_pre_http_connection(remote, NULL);
+    ap_proxy_pre_http_connection(remote);
 
 
     /*
index 3fbc8a5003b26ce60f13cf703ec6a654c7986995..b9d9ddc8370e47c85ca830bdbbc3fe725c5e2cfd 100644 (file)
@@ -432,7 +432,7 @@ apr_status_t ap_proxy_http_create_connection(apr_pool_t *p, request_rec *r,
                      "proxy: connection complete");
 
         /* set up the connection filters */
-        ap_proxy_pre_http_connection(*origin, NULL);
+        ap_proxy_pre_http_connection(*origin);
     }
     return OK;
 }
index 998904399e5c3ea5ccf0bdd6728bb52e106a29be..567f14866260cb4cbbfda93d1e6eab1cc89bfb1b 100644 (file)
@@ -373,8 +373,11 @@ PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r)
     rp->server = r->server;
     rp->request_time = r->request_time;
     rp->connection      = c;
+    rp->output_filters=NULL;
+    rp->input_filters=NULL;
     rp->output_filters  = c->output_filters;
     rp->input_filters   = c->input_filters;
+    ap_proxy_pre_http_request(c,rp);
 
     rp->request_config  = ap_create_request_config(c->pool);
     req_cfg = apr_pcalloc(rp->pool, sizeof(core_request_config));
@@ -976,14 +979,18 @@ PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *c
 }
 
 /* set up the minimal filter set */
-PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c, request_rec *r)
+PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c)
+{
+//    ap_add_input_filter("HTTP_IN", NULL, r, c);
+    ap_add_input_filter("CORE_IN", NULL, NULL, c);
+    ap_add_output_filter("CORE", NULL, NULL, c);
+    return OK;
+}
+PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r)
 {
     ap_add_input_filter("HTTP_IN", NULL, r, c);
-    ap_add_input_filter("CORE_IN", NULL, r, c);
-    ap_add_output_filter("CORE", NULL, r, c);
     return OK;
 }
-
 /* converts a series of buckets into a string */
 PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb,
                                  char *buff, size_t bufflen, int *eos)