Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96530 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2160 invoked from network); 20 Oct 2016 22:59:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Oct 2016 22:59:03 -0000 Authentication-Results: pb1.pair.com header.from=php-lists@scopey.co.nz; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php-lists@scopey.co.nz; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain scopey.co.nz from 209.85.216.178 cause and error) X-PHP-List-Original-Sender: php-lists@scopey.co.nz X-Host-Fingerprint: 209.85.216.178 mail-qt0-f178.google.com Received: from [209.85.216.178] ([209.85.216.178:34998] helo=mail-qt0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/9C-24564-13C49085 for ; Thu, 20 Oct 2016 18:59:00 -0400 Received: by mail-qt0-f178.google.com with SMTP id f6so73445013qtd.2 for ; Thu, 20 Oct 2016 15:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scopey-co-nz.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kKKiC2njNWdVS09RuTx+GScAWbTA80MiEQWrR0faYxI=; b=korj62PsSbINK4AuOBBxUjk49OujZy/Y0Q8rgBnQzAAKGQ0hxOQPFrUx/WL1g9ajQ1 tZkKpC2THC+kjy5pwtiWaYYqlIdjshBfB5u3yEXncBMDuOgLO+XkABadhzUSlUEgRTIt WaPo3r2h7wo0hF2Fu9KxBbDbotBuCv5KgvNAvvwV1rzU4DslQVkvU2q5CYMoRgpc2V7d mQci+fpSDd0ZrvXHpDD6r+u6+Wqmr/qm4itAJ2C+VtvD2RhdFD/sDmjaM6IcMUrCy3Bl PgFz3LOFbkuw44G8vrUCz8MNxArz29fb+rddFJb4pmMU5A52ZD35WDAQzV+QG13jOBex llPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kKKiC2njNWdVS09RuTx+GScAWbTA80MiEQWrR0faYxI=; b=RSO41xf4Pf8Kb98v5Lrml/u9YObwMVInqv+/FuRsCPMk6xpERKbr1U5ZhaDml2U0Xd DihilCIZhHWrRlgPPJgwBreWocBvhm24l9K5eX9rLN1vKMnrnICAPeDjY73Sf/HZIrZe qjjUtHBdEcNpHtHETs/zqY78PyacpPJmuE/GyCx6xLGZERWja+Ql0aNFsJmSyaBjuin1 SXMJ+aIz8qmIoGbKo/j2s/M7QVgfEx19B+xSrAdq+Ox8C/uOil8LlJ+Vt3Mndatw14Pm 0Vc7Qq/MGW5xED/henOQRKk/A1B55CFf4V1TWR4UbFFMJm/lwrQnERvjEij3JGOj5RGU C2gg== X-Gm-Message-State: ABUngve3v9M6PzeQHQUjYkbYWYywVBE+wrX+JVBn0QDoMoa634U5KkErRgje6ELjB9fFryrjsk+Dd55ULQiHCA== X-Received: by 10.200.43.144 with SMTP id m16mr2743041qtm.39.1477004334978; Thu, 20 Oct 2016 15:58:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.169.13 with HTTP; Thu, 20 Oct 2016 15:58:54 -0700 (PDT) X-Originating-IP: [210.48.49.168] In-Reply-To: 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 11:58:54 +1300 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11412598b7f26e053f53de57 Subject: Re: [PHP-DEV] header() removes all header of the same name. From: php-lists@scopey.co.nz (Guy Marriott) --001a11412598b7f26e053f53de57 Content-Type: text/plain; charset=UTF-8 FWIW Yasuo, I also think this is a bad idea. If you remove the ability to set cookie _headers_ with the header function then the function needs a more appropriate name - perhaps headerExceptCookie. That makes 5 people opposed - 100% of the individuals who have responded in this thread. On Fri, Oct 21, 2016 at 10:41 AM, Yasuo Ohgaki wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11412598b7f26e053f53de57--