httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject cvs commit: httpd-proxy/module-2.0 mod_proxy.h proxy_http.c proxy_util.c
Date Tue, 10 Apr 2001 20:44:18 GMT
minfrin     01/04/10 13:44:18

  Modified:    module-2.0 mod_proxy.h proxy_http.c proxy_util.c
  Log:
  Make sure the filter stack in a reused downstream connection is reset
  so we don't get lots of DECHUNK filters when we don't want them.
  
  Revision  Changes    Path
  1.44      +1 -0      httpd-proxy/module-2.0/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- mod_proxy.h	2001/04/10 19:52:39	1.43
  +++ mod_proxy.h	2001/04/10 20:44:15	1.44
  @@ -243,5 +243,6 @@
   int ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf, apr_sockaddr_t *uri_addr);
   int ap_proxy_pre_http_connection(conn_rec *c, request_rec *r);
   apr_status_t ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb, char *buff, size_t
bufflen);
  +void ap_proxy_reset_output_filters(conn_rec *c);
   
   #endif /*MOD_PROXY_H*/
  
  
  
  1.53      +4 -0      httpd-proxy/module-2.0/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- proxy_http.c	2001/04/10 19:52:39	1.52
  +++ proxy_http.c	2001/04/10 20:44:16	1.53
  @@ -313,6 +313,9 @@
   	origin = conf->connection;
   	new = 0;
   
  +	/* reset the connection filters */
  +	ap_proxy_reset_output_filters(origin);
  +
   	/* XXX FIXME: If the socket has since closed, change new to 1 so
   	 * a new socket is opened */
       }
  @@ -699,6 +702,7 @@
   	    if ((buf = ap_proxy_removestr(r->pool, buf, "chunked"))) {
   		apr_table_set(r->headers_out, "Transfer-Encoding", buf);
   	    }
  +/* FIXME: Make sure this filter is removed if this connection is reused */
   	    ap_add_input_filter("DECHUNK", NULL, rp, origin);
   	}
   
  
  
  
  1.52      +19 -0     httpd-proxy/module-2.0/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_util.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- proxy_util.c	2001/04/10 19:52:40	1.51
  +++ proxy_util.c	2001/04/10 20:44:16	1.52
  @@ -1131,6 +1131,25 @@
   
   }
   
  +/* remove other filters (like DECHUNK) from filter stack */
  +void ap_proxy_reset_output_filters(conn_rec *c)
  +{
  +    ap_filter_t *f = c->output_filters;
  +
  +    while (f) {
  +        if (!strcasecmp(f->frec->name, "CORE") ||
  +            !strcasecmp(f->frec->name, "CONTENT_LENGTH") ||
  +            !strcasecmp(f->frec->name, "HTTP_HEADER")) {
  +            f = f->next;
  +            continue;
  +        }
  +        else {
  +            ap_remove_output_filter(f);
  +            f = f->next;
  +        }
  +    }
  +}
  +
   #if defined WIN32
   
   static DWORD tls_index;
  
  
  

Mime
View raw message