Skip to content

Commit

Permalink
Merge pull request #2642 from xrmx/fix-2635
Browse files Browse the repository at this point in the history
apache2: let httpd handle CL/TE for non-http handlers
  • Loading branch information
xrmx authored May 14, 2024
2 parents 353b7dd + 2abdd3d commit f8c3bcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apache2/mod_proxy_uwsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,12 @@ static int uwsgi_response(request_rec *r, proxy_conn_rec *backend, proxy_server_
return HTTP_BAD_GATEWAY;
}

/* T-E wins over C-L */
if (apr_table_get(r->headers_out, "Transfer-Encoding")) {
apr_table_unset(r->headers_out, "Content-Length");
backend->close = 1;
}

if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
ap_set_content_type(r, apr_pstrdup(r->pool, buf));
}
Expand Down

0 comments on commit f8c3bcb

Please sign in to comment.