Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98172 invoked from network); 20 Oct 2016 21:42:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2016 21:42:25 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:47521] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/2C-24564-E3A39085 for ; Thu, 20 Oct 2016 17:42:24 -0400 Received: (qmail 114022 invoked by uid 89); 20 Oct 2016 21:42:18 -0000 Received: from unknown (HELO mail-qk0-f175.google.com) (yohgaki@ohgaki.net@209.85.220.175) by 0 with ESMTPA; 20 Oct 2016 21:42:18 -0000 Received: by mail-qk0-f175.google.com with SMTP id n189so120883017qke.0 for ; Thu, 20 Oct 2016 14:42:18 -0700 (PDT) X-Gm-Message-State: ABUngvehxKyILy1B76AwH9kHHlhIDd9HJaJWZqcy+/5+zkYaFDQiJMqT9V99tsaSecZObunJ5NTMte6Oo6dUzA== X-Received: by 10.55.221.29 with SMTP id n29mr3059919qki.114.1476999732567; Thu, 20 Oct 2016 14:42:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.22.38 with HTTP; Thu, 20 Oct 2016 14:41:31 -0700 (PDT) In-Reply-To: <6f67a2c1-d386-0ab3-5c3b-fe1402a0a925@gmail.com> References: <1eab7492-596c-ffd2-81ed-0eb9256a033e@gmail.com> <0B722A15-A29F-498B-987F-F6BA5AA49EEF@bobs-bits.com> <6f67a2c1-d386-0ab3-5c3b-fe1402a0a925@gmail.com> Date: Fri, 21 Oct 2016 06:41:31 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Stanislav Malyshev Cc: Stephen Reay , "internals@lists.php.net" , Davey Shafik , Xinchen Hui Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] header() removes all header of the same name. From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Stats, On Fri, Oct 21, 2016 at 5:54 AM, Stanislav Malyshev wrote: > >> The idea is to separate HTTP header handling functions. >> >> - header*() for any HTTP headers except 'Set-Cookie' >> - cookie*() for only 'Set-Cookie' header > > This does not look like a good design. First of all, HTTP spec allows > multiple instances of any header. Second, making function with unobvious > gotcha branch is usually bad design. Third, we are solving non-existing > problem here - people should just use existing functions correctly and > everything would be fine. > Let's not spend any more time on this. OK. 4 people not in favor of Set-Cookie restriction for header*(). What about API clean up? Since we have setcookie()/setrawcookie() already, we may clean up current cookie API e.g. - cookie_set/setcookie($name, [$value, [array $options]]) (Keep current signature also) - cookie_set_raw/setrawcookie($name, [$value, [array $options]]) (Keep current signature also) - cookie_remove($name), cookie_list() (These may be optional to you) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net