]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Small fixes.
authorGraham Leggett <minfrin@apache.org>
Tue, 10 Apr 2001 21:31:10 +0000 (21:31 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 10 Apr 2001 21:31:10 +0000 (21:31 +0000)
PR:
Obtained from:
Reviewed by:

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

modules/proxy/proxy_http.c

index 753e719f596d638ebbd24b39f0af3a0249bb86a3..1095ea621a48adad37b8db436d22a7c080c18307 100644 (file)
@@ -671,20 +671,21 @@ int ap_proxy_http_handler(request_rec *r, char *url,
     /* munge the Location and URI response headers according to ProxyPassReverse */
     {
        const char *buf;
-/* XXX FIXME: this isn't working */
-        if ((buf = apr_table_get(r->headers_out, "Location")) != NULL)
+        if ((buf = apr_table_get(r->headers_out, "Location")) != NULL) {
            apr_table_set(r->headers_out, "Location", ap_proxy_location_reverse_map(r, buf));
-        if ((buf = apr_table_get(r->headers_out, "Content-Location")) != NULL)
+       }
+        if ((buf = apr_table_get(r->headers_out, "Content-Location")) != NULL) {
            apr_table_set(r->headers_out, "Content-Location", ap_proxy_location_reverse_map(r, buf));
-        if ((buf = apr_table_get(r->headers_out, "URI")) != NULL)
+       }
+        if ((buf = apr_table_get(r->headers_out, "URI")) != NULL) {
            apr_table_set(r->headers_out, "URI", ap_proxy_location_reverse_map(r, buf));
+       }
     }
 
     r->sent_bodyct = 1;
     /* Is it an HTTP/0.9 response? If so, send the extra data */
     if (backasswards) {
         apr_ssize_t cntr = len;
-        /* FIXME: what is buffer used for here? It is of limited size */
         e = apr_bucket_heap_create(buffer, cntr, 0, NULL);
         APR_BRIGADE_INSERT_TAIL(bb, e);
     }
@@ -700,7 +701,6 @@ int ap_proxy_http_handler(request_rec *r, char *url,
            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);
        }
 
@@ -729,8 +729,7 @@ int ap_proxy_http_handler(request_rec *r, char *url,
                break;
            }
            ap_pass_brigade(r->output_filters, bb);
-           apr_brigade_destroy(bb);
-           bb = apr_brigade_create(p);
+           apr_brigade_cleanup(bb);
        }
        ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
                     "proxy: end body send");