Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78569 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15227 invoked from network); 3 Nov 2014 08:07:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Nov 2014 08:07:43 -0000 Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.50 as permitted sender) X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:33226] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/90-08476-DC737545 for ; Mon, 03 Nov 2014 03:07:42 -0500 Received: by mail-la0-f50.google.com with SMTP id hz20so6451355lab.23 for ; Mon, 03 Nov 2014 00:07:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=HbA71h95WBk4XWbJ1JOVTwE5gsTBLP2rEqa9PT62cek=; b=gQ62T6dVICyl9NlD9YyR1pQNfMWhCldLUWzvM55zNJ6m39t4iN43IlCLh5RlcbC1Xi 4BYp/lYI+NGKaH05IE0KWc3akdR+DPynibTmQEY63+9f4uZDMqrKVWJPJp3OiNRSoAkk 34lZahEfbxOrSmdsZ7o7U+2xPT+yDUgiFBbyL2gSUI3z3ijx/eRB/6cJm5i5gfXlrBer YBN0SxlYao184m5hDIq2SQAP4TDXtVKEtqppyOIm2ORknswQcrp0WJsUqChEDC5B3qPy wcjlhcTh9RwxCRK6/prxNcSc7rx5rri+HJGIjxSQnpwe/VBqdWKUSA2StYU9QFbhTHhz Boew== X-Received: by 10.152.120.199 with SMTP id le7mr26093995lab.67.1415002058268; Mon, 03 Nov 2014 00:07:38 -0800 (PST) Received: from [10.0.1.8] ([91.219.26.208]) by mx.google.com with ESMTPSA id l7sm7648881lah.27.2014.11.03.00.07.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Nov 2014 00:07:37 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: Date: Mon, 3 Nov 2014 11:07:36 +0300 Cc: Rowan Collins , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: References: <545554F7.70906@gmail.com> <581CB00C-59B7-4263-8533-D7DCB54C806E@ajf.me> To: Dan Ackroyd X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] setcookie() minor BC break - fixes issue #67736 From: indeyets@gmail.com (Alexey Zakhlestin) > On 03 Nov 2014, at 02:21, Dan Ackroyd wrote: >=20 > On 2 November 2014 15:10, Rowan Collins = wrote: >> Wait, what does session handling have to do with any of this? >=20 > Sorry, I completely failed to write what I was trying to say there. >=20 > I meant that like the session handling functions and setcookie are > similar in that: >=20 > * They don't feel that nice to use. > * The exact behaviour of them is currently correct but doesn't cater > for higher level logic e.g. making a script setting the same cookie be > an error rather than accepting it. >=20 > Both of them could probably do with being made nicer - but that can be > done in user-land. There's no _need_ to fix them in the core > libraries. well, one thing which could be done is decoupling building of = cookie-header from adding this header to the response. setcookie(=E2=80=A6) =3D header(build_cookie_header(=E2=80=A6)) this would be much closer to what I would call a low-level API --=20 Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc