1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

let httpd handle CL/TE for non-http handlers

Submitted By: ylavic, covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916769 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Covener
2024-04-03 11:49:53 +00:00
parent 2115548213
commit 61645eaac8
8 changed files with 68 additions and 3 deletions

View File

@@ -404,6 +404,12 @@ static int uwsgi_response(request_rec *r, proxy_conn_rec * backend,
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));
}