Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16979

Re: Rant: http_build_query() and arg_separator.output

Path csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: Rant: http_build_query() and arg_separator.output
Date Fri, 26 Aug 2016 11:48:19 +0200
Organization solani.org
Lines 25
Message-ID <npp38v$8vj$1@solani.org> (permalink)
References <71e67ba6-2bd8-bc0f-3276-b8dbfd6b75c9@arnowelzel.de>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1472204895 9203 eJwFwYEBwDAEBMCVUE+Moy/2HyF3+EKD6YFwLDamNklC/pu+p5ulR6dg3ZcyjfRrKWEDST40DRGR (26 Aug 2016 09:48:15 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Fri, 26 Aug 2016 09:48:15 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
X-User-ID eJwFwYEBwCAIA7CXZLYVzkG2/n/CEm6F5kAUaFrHxsXCV533OsY18KwiVf3Ui86VkXwm1PsHKLQRDw==
X-NNTP-Posting-Host eJwFwQkBwDAIA0BLfAlMzlrAv4Tewam8GQQDi00/Myt1c4CkCao/LEdS/3CGtVUfwMe0tB8UghB9
Cancel-Lock sha1:BQ/XeVyr6gJy+VEYUOacXg5GX6I=
In-Reply-To <71e67ba6-2bd8-bc0f-3276-b8dbfd6b75c9@arnowelzel.de>
Xref csiph.com comp.lang.php:16979

Show key headers only | View raw


On 26.08.2016 at 09:05, Arno Welzel wrote:

> Anway - the original behaviour of http_build_query() was to use single
> ampersands.
> 
> But NOW the default behaviour is just unpredictable, since the function
> uses either a single ampersand OR if set the runtime configuration
> arg_separator.output.

That's not quite correct.  Actually, arg_separator.output is available
as of PHP 4.0.5, but http_build_query() has been introduced in PHP 5.0.0
only, and the function used the ini setting from the beginning.  So
there has not been a BC break here.

Furthermore, http_build_query()'s behavior is not unpredictable, but it
rather depends on a PHP_INI_ALL ini setting (unless the $arg_separator
argument is set).  A portable software is supposed to either set
$arg_separator or arg_separator.output when using http_build_query() (or
at the very least to document the issue).

So I suggest that you file a ticket for the software that doesn't do so.

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-08-26 09:05 +0200
  Re: Rant: http_build_query() and arg_separator.output "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-26 11:48 +0200
    Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-08-29 07:43 +0200
      Re: Rant: http_build_query() and arg_separator.output Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-29 13:16 +0100
        Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-08-30 08:39 +0200
          Re: Rant: http_build_query() and arg_separator.output Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-30 15:10 +0100
            Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-09-01 08:43 +0200
              Re: Rant: http_build_query() and arg_separator.output Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-07 22:18 +0200
      Re: Rant: http_build_query() and arg_separator.output "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-29 14:53 +0200
        Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-09-01 08:53 +0200

csiph-web