Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69795 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3548 invoked from network); 23 Oct 2013 02:19:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2013 02:19:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.173 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.223.173 mail-ie0-f173.google.com Received: from [209.85.223.173] ([209.85.223.173:47062] helo=mail-ie0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/63-10840-C4237625 for ; Tue, 22 Oct 2013 22:19:56 -0400 Received: by mail-ie0-f173.google.com with SMTP id u16so284845iet.4 for ; Tue, 22 Oct 2013 19:19:53 -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=t41Zwq20TX5+kOGhHtA5kk0GgPGnP8Xe97juScKGJNE=; b=sdIv6O/6PF9OYh7Gfk48463ZaZwG1e5MIY+/F+utoXADTPwwFbRFuWDcG29XRwKKNZ gL2C1vRaVJUtZIVadsnKxWV816GLunWO/U0cm2XmEzabqzdOYRQdTl485opNRdzfW+qP 9i6xeLbBD1Mp6qJD7sGMA/BeMakX3Syvjs1BExE5MFo4unoZw3l4TwSjQIPdhhfRi3g4 58lU0jnBfitCNWx+DoEbzepuxMQ5s8qkeQbPfGWJWf8dF7gJc8WlhSek+BjV9ey/OESb rBweEpuEB7LOEB3kFHWrE6uynaWeAvMx4wVVfCd71BLTKCHlCEGbRtET7t+/RH5PDDRn tZhw== MIME-Version: 1.0 X-Received: by 10.50.50.225 with SMTP id f1mr387igo.2.1382494793732; Tue, 22 Oct 2013 19:19:53 -0700 (PDT) Received: by 10.50.73.42 with HTTP; Tue, 22 Oct 2013 19:19:53 -0700 (PDT) In-Reply-To: References: <52603390.7020609@ajf.me> <5266E5D0.3090506@ajf.me> <526712D2.7080100@ajf.me> <526717C5.6020509@ajf.me> Date: Wed, 23 Oct 2013 04:19:53 +0200 Message-ID: To: Yasuo Ohgaki Cc: Andrea Faulds , PHP internals Content-Type: multipart/alternative; boundary=047d7bdc117215978904e95f2744 Subject: Re: [PHP-DEV] [PATCH] Add apache_request_headers() and apache_response_headers() to the CLI server From: tyra3l@gmail.com (Ferenc Kovacs) --047d7bdc117215978904e95f2744 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Oct 23, 2013 at 3:20 AM, Yasuo Ohgaki wrote: > Hi Andrea, > > On Wed, Oct 23, 2013 at 9:26 AM, Andrea Faulds wrote: > > > But it already exists. Why add *another* alias? We should make > > apache_response_headers() have a consistent alias, something like > > getresponseheaders(). Then we'll have: > > > > * apache_request_headers() and getallheaders() > > * apache_response_headers() and getresponseheaders() > > > > Under your proposal, we'd have: > > > > * apache_request_headers(), sapi_request_headers(), and getallheaders() > > * apache_response_headers() and sapi_response_headers() > > > > It is not good idea introducing non-standard function name in new release= s. > getallheaders() should be depreciated in the future as it does not confor= m > current naming convention. > > How about this? > > PHP 5.6: Document getallhaeders() as deprecated. > PHP 5.7: Raise deprecated error for getallheaders(). > PHP 6.x: Remove getallheaders() adoption is done. (Perhaps 5 or 10 years > from now?) > > It would be nicer cleaning up mess in the long run, rather than > introducing new mess. IMHO. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > I would stick with the original proposal as it is a well understood and self-contained feature with neglible/no BC break. Handling the (possible) deprecation and removal of the apache_ functions should be a separate topic(if you start walking down on that path, you have to also consider other functions like apache_child_terminate which is also provided by the cgi-fastcgi SAPI) and should be given a bit more thought and because of the BC implications it is also a longer process(as you also mentioned yourself). Thanks for your feedback! --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7bdc117215978904e95f2744--