|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #16092 Ability to supress/delete HTTP headers (especially Content-Type)
Submitted: 2002-03-15 04:37 UTC Modified: 2002-03-15 12:19 UTC
From: jgirouard at macrowerx dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.1.2 OS: FreeBSD 4.2
Private report: No CVE-ID: None
 [2002-03-15 04:37 UTC] jgirouard at macrowerx dot com
I would like the ability send raw headers to Apache or web client, or at least to delete headers before they are sent to the client.

As a developer, it is important to me to have the freedom to determine which headers I need for my particular application.  Having the Content-Type header forced on me is really throwing a wrench in my project.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-15 10:00 UTC]

You can replace this enough?


 [2002-03-15 12:04 UTC] jgirouard at macrowerx dot com
No, I experimented with the header() function, but it does not do what I need unless there is something about header() that is not documented.
I need to be able to completely do away with all the conventional headers.  Something along the lines of header_delete("Content-Type") would be great! :)

I guess what I'm looking for is a mod_php4 equivalent of the -q switch in the command line version of php.
 [2002-03-15 12:07 UTC]
The problem is that when you use PHP as an Apache module, PHP is not in control of the final headers.  Apache is.  Even if PHP didn't set a content-type header, then Apache would add it.  So this feature request really should be sent to the Apache project for an enhancement of the Apache API.  The only time PHP is fully in control is when you run it from the command line.
 [2002-03-15 12:19 UTC] jgirouard at macrowerx dot com
Good explanation.  Thank you!

I'll go take it up with Apache then :)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 08:01:27 2024 UTC