Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77095 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6037 invoked from network); 8 Sep 2014 07:15:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2014 07:15:10 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:57231] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/31-26504-C775D045 for ; Mon, 08 Sep 2014 03:15:09 -0400 Received: by mail-wi0-f175.google.com with SMTP id ex7so1907856wid.14 for ; Mon, 08 Sep 2014 00:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GVvlwiTiAYw00tsPnpEZlq5ei6vdHHHSJFlDXznbaZo=; b=fd3kAjzUSIwYG0ruaET0EE3P4kGfMDe/cyJc8wfFeF8iSrBLDSJVBSotOfBF6NjQTw fww79wTpWopcwam1XCEQys4UAnJyPrDplPCtGVoCZpHk2emi/sVzkC3aqSPA64Y42gkt 8ud1ctm8E9CVHOcCuUlEKVrcAJeFTMgVV37QF6kPafWLi8vnTlX1qX80n8IEZesaPQip BX3dK2ynU/dZvzBesOPyyQk6n6i91zqFmvapSetxmUXctEhHBwwKvLhtb1vYJdUkDbnc UgJwMLkgE/qTR948qqt3R4/EV+xsDem8eXsOyXRgnlBe/PjCTbTqXVEKAHblM51dgAHf B5vw== MIME-Version: 1.0 X-Received: by 10.180.19.233 with SMTP id i9mr704305wie.17.1410160505845; Mon, 08 Sep 2014 00:15:05 -0700 (PDT) Received: by 10.216.35.1 with HTTP; Mon, 8 Sep 2014 00:15:05 -0700 (PDT) In-Reply-To: References: Date: Mon, 8 Sep 2014 03:15:05 -0400 Message-ID: To: Tjerk Meesters Cc: Florian Margaine , PHP Internals Content-Type: multipart/alternative; boundary=bcaec53d5e0306ff020502889441 Subject: Re: [PHP-DEV] setcookie() minor BC break - fixes issue #67736 From: theanomaly.is@gmail.com (Sherif Ramadan) --bcaec53d5e0306ff020502889441 Content-Type: text/plain; charset=UTF-8 Actually, we shouldn't be doing that all. We should simply just overwrite the header. It wouldn't make much sense to set two headers with the same cookie name when we can just overwrite it. On Mon, Sep 8, 2014 at 2:50 AM, Tjerk Meesters wrote: > Hi! > > > On Sat, Sep 6, 2014 at 5:38 AM, Florian Margaine > wrote: > > > Hi, > > > > This is a minor BC break, but still a BC break, so worth discussing on > this > > ML. > > > > When a second setcookie() is done with the same name, a warning is > emitted, > > because the ietf rfc 6265 says it *should* only send one Set-Cookie > header > > per name. > > > > This is fine when display_errors is set to off. When it's set to on, the > > warning prevents the header from being added because "headers already > sent" > > (which is the minor BC break, as current PHP just sends 2 Set-Cookie > > headers with the same name). > > > > Yeah, it would prevent any header() or setcookie() following that warning > from taking place. > > How about delaying that warning until the headers are sent? > > > > > > So, should it be merged? What should be done to comply with the ietf rfc > > 6265? > > > > PR: https://github.com/php/php-src/pull/795/ > > PHP issue: https://bugs.php.net/bug.php?id=67736 > > > > Regards, > > > > *Florian Margaine* > > > > > > -- > -- > Tjerk > --bcaec53d5e0306ff020502889441--