You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2001/10/08 21:25:36 UTC

cvs commit: httpd-2.0/modules/proxy mod_proxy.h proxy_ftp.c proxy_http.c proxy_util.c

ianh        01/10/08 12:25:36

  Modified:    modules/proxy mod_proxy.h proxy_ftp.c proxy_http.c
                        proxy_util.c
  Log:
  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.
  
  Revision  Changes    Path
  1.64      +2 -1      httpd-2.0/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.h,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_proxy.h	2001/09/28 10:33:39	1.63
  +++ mod_proxy.h	2001/10/08 19:25:35	1.64
  @@ -258,7 +258,8 @@
   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);
   
  
  
  
  1.81      +2 -2      httpd-2.0/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- proxy_ftp.c	2001/10/01 15:45:11	1.80
  +++ proxy_ftp.c	2001/10/08 19:25:35	1.81
  @@ -774,7 +774,7 @@
        */
   
       /* 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 @@
       }
   
       /* set up the connection filters */
  -    ap_proxy_pre_http_connection(remote, NULL);
  +    ap_proxy_pre_http_connection(remote);
   
   
       /*
  
  
  
  1.100     +1 -1      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- proxy_http.c	2001/09/28 10:23:32	1.99
  +++ proxy_http.c	2001/10/08 19:25:35	1.100
  @@ -432,7 +432,7 @@
                        "proxy: connection complete");
   
           /* set up the connection filters */
  -        ap_proxy_pre_http_connection(*origin, NULL);
  +        ap_proxy_pre_http_connection(*origin);
       }
       return OK;
   }
  
  
  
  1.69      +11 -4     httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- proxy_util.c	2001/08/07 21:18:03	1.68
  +++ proxy_util.c	2001/10/08 19:25:35	1.69
  @@ -373,8 +373,11 @@
       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 @@
   }
   
   /* 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)
  
  
  

Re: cvs commit: httpd-2.0/modules/proxy mod_proxy.h proxy_ftp.c proxy_http.c proxy_util.c

Posted by Ian Holsman <ia...@apache.org>.
On Mon, 08 Oct 2001 14:15:46 -0700, Greg Stein wrote:

> On Mon, Oct 08, 2001 at 07:25:36PM -0000, ianh@apache.org wrote:
>>...
>>   +PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c)
>>    {
>>   +//    ap_add_input_filter("HTTP_IN", NULL, r, c);
> 
> No C++ comments, please.
> 
Sorry...
that shouldn't have been in there at all.
> 
> Cheers,
> -g
>

Re: cvs commit: httpd-2.0/modules/proxy mod_proxy.h proxy_ftp.c proxy_http.c proxy_util.c

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Oct 08, 2001 at 07:25:36PM -0000, ianh@apache.org wrote:
>...
>   +PROXY_DECLARE(int) ap_proxy_pre_http_connection(conn_rec *c)
>    {
>   +//    ap_add_input_filter("HTTP_IN", NULL, r, c);

No C++ comments, please.


Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/