forked from pool/apache2
06c2e29428
c2fffd29b0
+ apache2-issue-444.patch
OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=702
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
Index: httpd-2.4.59/modules/generators/mod_cgid.c
|
|
===================================================================
|
|
--- httpd-2.4.59.orig/modules/generators/mod_cgid.c
|
|
+++ httpd-2.4.59/modules/generators/mod_cgid.c
|
|
@@ -1625,7 +1625,12 @@ static int cgid_handler(request_rec *r)
|
|
*/
|
|
if (!apr_table_get(r->subprocess_env, AP_TRUST_CGILIKE_CL_ENVVAR))
|
|
apr_table_unset(r->headers_out, "Content-Length");
|
|
- apr_table_unset(r->headers_out, "Transfer-Encoding");
|
|
+
|
|
+ if (apr_table_get(r->headers_out, "Transfer-Encoding") != NULL) {
|
|
+ apr_brigade_cleanup(bb);
|
|
+ return log_scripterror(r, conf, HTTP_BAD_GATEWAY, 0, APLOGNO(10501)
|
|
+ "script sent Transfer-Encoding");
|
|
+ }
|
|
|
|
if (ret != OK) {
|
|
ret = log_script(r, conf, ret, dbuf, sbuf, bb, NULL);
|
|
Index: httpd-2.4.59/modules/generators/mod_cgi.c
|
|
===================================================================
|
|
--- httpd-2.4.59.orig/modules/generators/mod_cgi.c
|
|
+++ httpd-2.4.59/modules/generators/mod_cgi.c
|
|
@@ -976,7 +976,12 @@ static int cgi_handler(request_rec *r)
|
|
*/
|
|
if (!apr_table_get(r->subprocess_env, AP_TRUST_CGILIKE_CL_ENVVAR))
|
|
apr_table_unset(r->headers_out, "Content-Length");
|
|
- apr_table_unset(r->headers_out, "Transfer-Encoding");
|
|
+
|
|
+ if (apr_table_get(r->headers_out, "Transfer-Encoding") != NULL) {
|
|
+ apr_brigade_cleanup(bb);
|
|
+ return log_scripterror(r, conf, HTTP_BAD_GATEWAY, 0, APLOGNO(10501),
|
|
+ "script sent Transfer-Encoding");
|
|
+ }
|
|
|
|
if (ret != OK) {
|
|
ret = log_script(r, conf, ret, dbuf, sbuf, bb, script_err);
|