From: Graham Leggett Date: Tue, 10 Apr 2001 21:31:10 +0000 (+0000) Subject: Small fixes. X-Git-Tag: 2.0.17~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edfc2c2ae9112b45674365abe51e778de1642832;p=thirdparty%2Fapache%2Fhttpd.git Small fixes. PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88800 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 753e719f596..1095ea621a4 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -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");