Re: setcookie() minor BC break - fixes issue #67736

From: Date: Mon, 03 Nov 2014 08:07:36 +0000
Subject: Re: setcookie() minor BC break - fixes issue #67736
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-78569@lists.php.net to get a copy of this message
> On 03 Nov 2014, at 02:21, Dan Ackroyd <danack@basereality.com> wrote: > > On 2 November 2014 15:10, Rowan Collins <rowan.collins@gmail.com> wrote: >> Wait, what does session handling have to do with any of this? > > Sorry, I completely failed to write what I was trying to say there. > > I meant that like the session handling functions and setcookie are > similar in that: > > * 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. > > 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(…) = header(build_cookie_header(…)) this would be much closer to what I would call a low-level API -- Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc

« previous php.internals (#78569) next »