On Thu, March 27, 2008 5:32 pm, Christian Schmidt wrote: > When a header has been set using header('Foo: bar') it can be replaced > with > other headers, but it cannot be removed.
I like the idea of being able to "unset" headers. I'm not sure I like the idea of calling what looks lik an invalid header() to unset one... One might envision a future PHP that would want to, for example, say: "Invalid header: Header must start with [A-Z]:" for somebody who does: header($foo); where $foo is some random typo string that's not a header at all. At the risk of incurring the wrath of everybody else, I'd prefer to see a new function like header_unset (or unset_header) to "undo" a header. Some questions I'd have about functionality: If a header was not set, and then you unset it, is that an error or E_NOTICE or anything? If you try to unset a header after the headers have gone out, presumably the same nifty message about WHERE the header was set would be output. But then to be truly pedantic, what if you unset a header that was never set in the first place, after the headers have gone out? Is this an error or any kind? Just trying to anticipate all the edge cases. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php