Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44448 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54042 invoked from network); 23 Jun 2009 20:23:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2009 20:23:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.216 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.220.216 mail-fx0-f216.google.com Received: from [209.85.220.216] ([209.85.220.216:37599] helo=mail-fx0-f216.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/61-36467-589314A4 for ; Tue, 23 Jun 2009 16:23:07 -0400 Received: by fxm12 with SMTP id 12so176336fxm.23 for ; Tue, 23 Jun 2009 13:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=MSjPbFfnTFlqWoRIvVi4pRpFV+yYodXXhbesxBJWae4=; b=gOeBKOPWDKCNVqt1TirD+UB8VdNcbJSBCY2ChrljDf7Iz3AgktWYgcyUuCKRc7i4cp t9ZVNVU3mo4m076g1Ck5jU4PAXZZu0Bem7pk5lzHDMJwz7BzRP4WzSNFtv5FzT7O6Voo C4tD+SuEYTnsas15RBpXvWcMULwxTZQhrEyAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JXW0BF7XdjiYkovIEx6j0MXgcwh2+1XBL/nI9bVEbJa97Kun2b9MHRPiVLQKKNvfqt reI12Bb1Ah2AFN1LhxCat8DAzGIndyu36oBZvqGVtN/tr1cYywwCoPhA/VOJW8ib2cgM d/RKT08133g14nKQtFlldUiG45t/Yclq54i1k= MIME-Version: 1.0 Received: by 10.86.92.9 with SMTP id p9mr749738fgb.15.1245788528830; Tue, 23 Jun 2009 13:22:08 -0700 (PDT) In-Reply-To: <310F6EAF-6EB4-45D0-BAC4-437C9C764AD0@darkrainfall.org> References: <7f3ed2c30906230155j12d81566o9b4bee3fe7749e48@mail.gmail.com> <1245786546.3551.6.camel@goldfinger.johannes.nop> <310F6EAF-6EB4-45D0-BAC4-437C9C764AD0@darkrainfall.org> Date: Tue, 23 Jun 2009 22:22:08 +0200 Message-ID: <7f3ed2c30906231322i4778a40bj78b04a6c25e4f0ad@mail.gmail.com> To: Gwynne Raskind Cc: =?ISO-8859-1?Q?Johannes_Schl=FCter?= , PHP Development Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] header_remove() issues (overly aggressive?) From: hannes.magnusson@gmail.com (Hannes Magnusson) 2009/6/23 Gwynne Raskind : > On Jun 23, 2009, at 3:49 PM, Johannes Schl=FCter wrote: >>> >>> While documenting header_remove() I was experimenting a little bit.. >>> >>> If an "empty" argument is passed to the function (empty string, null, >>> false,..) the function doesn't do anything, as it checks for >>> ZEND_NUM_ARGS() rather then the length of string.. thats a doc issue >>> or bug? >> >> I'd say it's ok, "remove the header with the name ''." That's what it >> does. > > A header named '' isn't valid in HTTP 1.0 or 1.1 anyway; this is an error > case IMO. Also, shouldn't we return false/true when we [can't] remove the named header? Or a int, with the number of removed items? >>> Second, it removes even the X-Powered-By header, is that expected? > > Useful for people who don't have control over their expose_php setting... > >>> Third, it removes session and even cookie headers.. >> >>> Is that really expected? Just add a big fat warning on the doc page? >> >> It removes all. Should be ok, too, removing the session cookie might >> even be considered a "good" feature by some. > > Including me! ;) Documented as a 'caution'. -Hannes