Skip to content

Commit

Permalink
apache2: let httpd handle CL/TE for non-http handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
covener authored and xrmx committed May 11, 2024
1 parent 353b7dd commit 2abdd3d
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 2abdd3d

Please sign in to comment.