]> granicus.if.org Git - apache/commitdiff
dechunking filter removed.
authorIan Holsman <ianh@apache.org>
Mon, 8 Oct 2001 21:49:17 +0000 (21:49 +0000)
committerIan Holsman <ianh@apache.org>
Mon, 8 Oct 2001 21:49:17 +0000 (21:49 +0000)
add HTTP_IN filter after the headers have been parsed.
so that the HTTP_IN can check them ;-)
Still not 100% if this works properly, but I don't get
the chunking numbers displayed on my browser,
so it's better than what was there.
PR:
Obtained from:
Submitted by:
Reviewed by:

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

modules/proxy/proxy_http.c
modules/proxy/proxy_util.c

index b9d9ddc8370e47c85ca830bdbbc3fe725c5e2cfd..ebd6305ce43adb2731c2498567b28c1394f1dcf9 100644 (file)
@@ -699,6 +699,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                 if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
                     r->content_type = apr_pstrdup(p, buf);
                 }            
+                ap_proxy_pre_http_request(origin,rp);
             }
 
             /* handle Via header in response */
@@ -793,29 +794,12 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
 
             const char *buf;
             apr_off_t readbytes;
-
-            /* if chunked - insert DECHUNK filter */
             if (ap_proxy_liststr((buf = apr_table_get(r->headers_out,
                                   "Transfer-Encoding")), "chunked")) {
-                rp->read_chunked = 1;
-                apr_table_unset(r->headers_out, "Transfer-Encoding");
-                if ((buf = ap_proxy_removestr(r->pool, buf, "chunked"))) {
-                    apr_table_set(r->headers_out, "Transfer-Encoding", buf);
-                }
-                ap_add_input_filter("DECHUNK", NULL, rp, origin);
-                readbytes = -1;
-            }
-            /* if content length - set the length to read */
-            else if ((buf = apr_table_get(r->headers_out, "Content-Length"))) {
-                readbytes = atol(buf);
-            }
-            /* no chunked / no length therefore read till EOF and
-             * cancel keepalive
-             */
-            else {
-                p_conn->close += 1;
+            ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
+                         "proxy: Transfer-Encoding Chunked!");
+                apr_table_unset(r->headers_out,"Content-Length");
             }
-
             /* if keepalive cancelled, read to EOF */
             if (p_conn->close) {
                 readbytes = -1;
index 567f14866260cb4cbbfda93d1e6eab1cc89bfb1b..9dab21388f7a73ac33f600bf5906d1eca7c31217 100644 (file)
@@ -377,7 +377,6 @@ PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r)
     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));
@@ -981,7 +980,6 @@ 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)
 {
-//    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;