How can I *prevent* Apache2 from setting the Content-Type header?
        Posted  
        
            by Norm
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Norm
        
        
        
        Published on 2010-03-11T20:51:32Z
        Indexed on 
            2010/03/11
            20:54 UTC
        
        
        Read the original article
        Hit count: 236
        
I have a CGI script that prints the following on stdout:
print "Status: 302 Redirect\n";
print "Server: Apache-Coyote/1.1\n";
print "Location: $redirect\n";
print "Content-Length: 0\n";
print "Date: $date\n\n";
Where $redirect and $date are reasonable values. What Apache2 actually sends also includes a Content-Type: header (text/plain). I've commented out the DefaultType in the server configuration file.
I'm trying to debug a downstream problem that arises when no Content-Type: header is sent. So what magic incantation do I have to perform to prevent Apache2 from adding the content type header?
© Stack Overflow or respective owner