You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Petr Gajdos <pg...@suse.cz> on 2016/11/01 13:22:37 UTC
failing t/php/strings2.t
Hi,
php 5.2 rawurlencode() converts tilde to %7E, this is not true from php
5.3 on, though:
$ php -r 'var_dump(rawurlencode("~"));'
string(1) "~"
$
http://php.net/manual/en/function.rawurlencode.php
Following patch is perhaps needed:
https://build.opensuse.org/package/view_file/Apache:Test/apache-test/apache-test-php-rawurlencode-tilde.patch
Petr
Re: failing t/php/strings2.t
Posted by Petr Gajdos <pg...@suse.cz>.
On Wed, Nov 02, 2016 at 06:33:18PM -0500, William A Rowe Jr wrote:
> Committed all three patches in r1767800, thanks Petr
Thank you.
Petr
Re: failing t/php/strings2.t
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Wed, Nov 2, 2016 at 1:27 AM, William A Rowe Jr <wr...@rowe-clan.net>
wrote:
> On Tue, Nov 1, 2016 at 10:24 AM, Petr Gajdos <pg...@suse.cz> wrote:
>
>> On Tue, Nov 01, 2016 at 10:12:31AM -0500, William A Rowe Jr wrote:
>> > On Tue, Nov 1, 2016 at 8:22 AM, Petr Gajdos <pg...@suse.cz> wrote:
>> > $ php -r 'var_dump(rawurlencode("~"));'
>> > string(1) "~"
>> > $
>> >
>> > http://php.net/manual/en/function.rawurlencode.php
>> >
>> > Following patch is perhaps needed:
>> > https://build.opensuse.org/package/view_file/Apache:Test/ap
>> ache-test/
>> > apache-test-php-rawurlencode-tilde.patch
>> >
>> >
>> > Silly follow-up question, why %7E out of urlencode() a few lines
>> further down?
>> >
>> > The canonical form of '~' is '~', not '%7E', as the character is not
>> reserved.
>>
>> Not that I can answer this question, but urlencode() seem to convert
>> it so:
>>
>> http://php.net/manual/en/function.urlencode.php
>>
>> $ php -r 'var_dump(urlencode("~"));'
>> string(3) "%7E"
>> $ php --version
>> PHP 7.0.12 (cli) ( NTS )
>> [..]
>>
>
> Fair enough, thanks for confirming.
>
> Wondering if we don't toggle both and set one as a TODO, but because
> all of the tests are evaluated only once, we can't be that selective in
> this
> particular case.
>
> Further wondering which of the PHP tests are Apache httpd tests, and
> which are actually core PHP tests that should be part of its own suite,
> and dropped from our suite entirely. "Fixing" this will lead to further
> failures when PHP adopts the current conventions in that second test,
> and immediately fail anyone who is still on PHP 3.2. Should we simply
> drop this test altogether?
>
Committed all three patches in r1767800, thanks Petr
Re: failing t/php/strings2.t
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Tue, Nov 1, 2016 at 10:24 AM, Petr Gajdos <pg...@suse.cz> wrote:
> On Tue, Nov 01, 2016 at 10:12:31AM -0500, William A Rowe Jr wrote:
> > On Tue, Nov 1, 2016 at 8:22 AM, Petr Gajdos <pg...@suse.cz> wrote:
> > $ php -r 'var_dump(rawurlencode("~"));'
> > string(1) "~"
> > $
> >
> > http://php.net/manual/en/function.rawurlencode.php
> >
> > Following patch is perhaps needed:
> > https://build.opensuse.org/package/view_file/Apache:Test/
> apache-test/
> > apache-test-php-rawurlencode-tilde.patch
> >
> >
> > Silly follow-up question, why %7E out of urlencode() a few lines further
> down?
> >
> > The canonical form of '~' is '~', not '%7E', as the character is not
> reserved.
>
> Not that I can answer this question, but urlencode() seem to convert
> it so:
>
> http://php.net/manual/en/function.urlencode.php
>
> $ php -r 'var_dump(urlencode("~"));'
> string(3) "%7E"
> $ php --version
> PHP 7.0.12 (cli) ( NTS )
> [..]
>
Fair enough, thanks for confirming.
Wondering if we don't toggle both and set one as a TODO, but because
all of the tests are evaluated only once, we can't be that selective in this
particular case.
Further wondering which of the PHP tests are Apache httpd tests, and
which are actually core PHP tests that should be part of its own suite,
and dropped from our suite entirely. "Fixing" this will lead to further
failures when PHP adopts the current conventions in that second test,
and immediately fail anyone who is still on PHP 3.2. Should we simply
drop this test altogether?
Re: failing t/php/strings2.t
Posted by Petr Gajdos <pg...@suse.cz>.
On Tue, Nov 01, 2016 at 10:12:31AM -0500, William A Rowe Jr wrote:
> On Tue, Nov 1, 2016 at 8:22 AM, Petr Gajdos <pg...@suse.cz> wrote:
> $ php -r 'var_dump(rawurlencode("~"));'
> string(1) "~"
> $
>
> http://php.net/manual/en/function.rawurlencode.php
>
> Following patch is perhaps needed:
> https://build.opensuse.org/package/view_file/Apache:Test/apache-test/
> apache-test-php-rawurlencode-tilde.patch
>
>
> Silly follow-up question, why %7E out of urlencode() a few lines further down?
>
> The canonical form of '~' is '~', not '%7E', as the character is not reserved.
Not that I can answer this question, but urlencode() seem to convert
it so:
http://php.net/manual/en/function.urlencode.php
$ php -r 'var_dump(urlencode("~"));'
string(3) "%7E"
$ php --version
PHP 7.0.12 (cli) ( NTS )
[..]
$
Petr
Re: failing t/php/strings2.t
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Tue, Nov 1, 2016 at 8:22 AM, Petr Gajdos <pg...@suse.cz> wrote:
> Hi,
>
> php 5.2 rawurlencode() converts tilde to %7E, this is not true from php
> 5.3 on, though:
>
> $ php -r 'var_dump(rawurlencode("~"));'
> string(1) "~"
> $
>
> http://php.net/manual/en/function.rawurlencode.php
>
> Following patch is perhaps needed:
> https://build.opensuse.org/package/view_file/Apache:Test/
> apache-test/apache-test-php-rawurlencode-tilde.patch
Silly follow-up question, why %7E out of urlencode() a few lines further
down?
The canonical form of '~' is '~', not '%7E', as the character is not
reserved.