Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41283 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83655 invoked from network); 20 Oct 2008 07:12:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2008 07:12:12 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.183 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.146.183 wa-out-1112.google.com Received: from [209.85.146.183] ([209.85.146.183:2337] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/51-59295-94F2CF84 for ; Mon, 20 Oct 2008 03:12:11 -0400 Received: by wa-out-1112.google.com with SMTP id j32so911190waf.7 for ; Mon, 20 Oct 2008 00:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=UVIbHEuaxxAAZ7iZaLNu0OQ2zD73Ywld9n0HZkbIql0=; b=tTiR7+DN+5HOhEjUo/PQmX7lhczMiMkHwd8kuh59Zdozp11UPZTvw47/6vkWpPrAkN DncdQuui8saxRb+JmYUxUfzG3TCXD8mzhT4+RmaW+P661jw/n5B8EJyIgPRQpUfCF6W0 4bX6yhDxhkd58RlY/yoiZeL+3jTbPTRswmTr4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=WApkrxkc2KVJwYeeGgk+WeP+nVuAMyMsBpBIzJbyc0uTuopIie9QSCTU29u4/ydBnt K8y2ISPS4kSraM2/yk3wTapyT0UD4GbWe9ZKqteSxO9Rqy4H7VDOKFIWN1/y6H8LYdww LG4H3k+scW+K0CvJff9eU7mbKjg+p3ZVgRPqQ= Received: by 10.114.198.1 with SMTP id v1mr5134650waf.64.1224486727197; Mon, 20 Oct 2008 00:12:07 -0700 (PDT) Received: by 10.114.148.19 with HTTP; Mon, 20 Oct 2008 00:12:07 -0700 (PDT) Message-ID: <7f3ed2c30810200012pbdb0530u4561cb1848dab89f@mail.gmail.com> Date: Mon, 20 Oct 2008 09:12:07 +0200 To: "Christian Schmidt" Cc: internals@lists.php.net In-Reply-To: <48FBA987.5030809@peytz.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48FBA987.5030809@peytz.dk> Subject: Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set using header() From: hannes.magnusson@gmail.com ("Hannes Magnusson") On Sun, Oct 19, 2008 at 23:41, Christian Schmidt wrote: > When a header has been set using header('Foo: bar') it can be replaced with > another value, but it cannot be removed. Hah! Hit that one last Friday too, gosh that was annoying! > I suggest extending the behaviour of header() so that when the first > argument does not contain a colon (and does not begin with "HTTP/"), e.g. > header('Vary'), it unsets the header with the specified name. I decided to > extend the existing header() function rather than adding a new function, > because the existing function already supports multiple actions (add, append > and replace). That isn't very intuitive. I would think it was a typo when reading such code and fix the header line... I'd suggest explicit header_remove("Vary"); -Hannes