302 Redirect from CGI script stopped working in Apache 2.4 -
i inherited maintenance of self-written cgi application without documentation , have never met original author. application stopped working in debian 8, worked in debian 7 , centos 5. main changes upgrade apache 2.2 (used debian 7 & centos 5) apache 2.4 (used debian 8) , upgrade perl 5.8 (in centos 5) respectively perl 5.14 (in debian 7) perl 5.20. problematic part boils down following script (a 302-redirect): #!/usr/bin/perl $|=1; # activate auto-flushing of stdout use strict; use warnings; $crlf = "\015\012"; print stdout "status: 302 moved temporarily$crlf" . "location: /does_not_matter$crlf" . "uri: /does_not_matter$crlf" . "connection: close$crlf" . "content-type: text/html; charset=utf-8$crlf$crlf"; close stdout; while(1) { sleep 1; } the observed behavior redirect never reaches client long script still running when used apache 2.4, there no error ...