Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55385 invoked from network); 9 Nov 2008 21:01:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Nov 2008 21:01:56 -0000 Authentication-Results: pb1.pair.com header.from=arnaud.lb@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arnaud.lb@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.154 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arnaud.lb@gmail.com X-Host-Fingerprint: 72.14.220.154 fg-out-1718.google.com Received: from [72.14.220.154] ([72.14.220.154:14607] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8E/C3-36888-2CF47194 for ; Sun, 09 Nov 2008 16:01:55 -0500 Received: by fg-out-1718.google.com with SMTP id 16so2076790fgg.23 for ; Sun, 09 Nov 2008 13:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id:sender; bh=vWYTWXQc3Qmu8MPq/IrO+Gmc6vu1ikgOT+6pQ57NZLs=; b=H4HWm7ebcVUqPdgozTTdUPNytGXkNiXXqLCYv8evyx6k3RZ53i+DF7cJQNuuuVKzp6 Oln63pbWlDhsjih8oEXGzSistqs3Tl95ZEZv4uM5Ul7hXLqKMUllnUQX0UJhOwKTtUCW ZPryxHFB1u0uRh466g3vaoEeBkhn2fpYEnCSs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id:sender; b=rYbKUZoe4lam0DYbLaWfF0LbFBakc/klKr5nWVd1PNDMKbGxaBnicL+bAbdowyDm82 3/ZAglxHseFTstAA3h3hMfOog1PtRAMEc4iezTBIKIqE4A8COggZjn3yowLZ8spiHKcH c6voZFqrLXWrm7y+qrSp1l+SQd/33kTJUQLWg= Received: by 10.181.5.1 with SMTP id h1mr1861292bki.56.1226264511776; Sun, 09 Nov 2008 13:01:51 -0800 (PST) Received: from 207-177-41-213.getmyip.com (207-177-41-213.getmyip.com [213.41.177.207]) by mx.google.com with ESMTPS id k29sm9233286fkk.2.2008.11.09.13.01.50 (version=SSLv3 cipher=RC4-MD5); Sun, 09 Nov 2008 13:01:50 -0800 (PST) To: internals@lists.php.net Date: Sun, 9 Nov 2008 22:01:36 +0100 User-Agent: KMail/1.10.3 (Linux/2.6.26-1-amd64; KDE/4.1.3; x86_64; ; ) Cc: Christian Schmidt References: <48FBA987.5030809@peytz.dk> <42FD82032C7D484CAC254FC5D6C292E1@pc> <49173133.4040104@peytz.dk> In-Reply-To: <49173133.4040104@peytz.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200811092201.36508.lbarnaud@php.net> Sender: Arnaud LB Subject: Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set usingheader() From: lbarnaud@php.net (Arnaud Le Blanc) On Sunday 09 November 2008 19:51:31 Christian Schmidt wrote: > Stan Vassilev | FM wrote: > > I suggest header_remove('*') or simply header_remove() /no param/ > > removes all headers (including the one PHP sets by default), so we can > > start with a clear state. > > I added header_remove('Foo'). header_remove() without arguments removes > all headers (though Apache still adds some headers that you cannot remove). > > I have tested with apache2handler and cgi. I had to change the signature > of SAPI header_handler function and sapi_header_struct, so the other > SAPIs should be updated for this. I am not sure how to test all these? > Creating a testing environment for all those webservers seems like a > huge task. > > I am not comfortable with the size of this patch, given my understanding > of the PHP source code and my general C skills, so I am posting this > patch hoping that somebody will pick it up or help me get it into shape. > It looks good. The signature change is not that bad if it forces all SAPIs to be updated and ensures that PHP behaves the same way with all SAPIs. It is also possible to add something like header_delete_handler() or header_handler_ex() to sapi_module_struct if the signature change is to be avoided. Regards, Arnaud