php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52533 ext/curl/tests/curl_multi_getcontent_basic3.phpt broken due php.net/robots.txt
Submitted: 2010-08-04 16:04 UTC Modified: 2010-08-07 00:57 UTC
From: glen at delfi dot ee Assigned: felipe (profile)
Status: Closed Package: *General Issues
PHP Version: 5.3.3 OS:
Private report: No CVE-ID: None
 [2010-08-04 16:04 UTC] glen at delfi dot ee
Description:
------------
ext/curl/tests/curl_multi_getcontent_basic3.phpt test is broken due 
php.net/robots.txt content change.

Test script:
---------------
test with --show-all



=====================================================================
PHP         : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3/sapi/cli/php
PHP_SAPI    : cli
PHP_VERSION : 5.3.3
ZEND_VERSION: 2.3.0
PHP_OS      : Linux - Linux carme-pld-i686 2.6.34.1-3 #1 SMP Tue Jul 6 16:15:11 CEST 2010 i686
INI actual  : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3/tmp-php.ini
More .INIs  :
CWD         : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
TEST 1/1 [ext/curl/tests/curl_multi_getcontent_basic3.phpt]
========SKIP========
<?php
if (!extension_loaded('curl')) print 'skip';
?>
========DONE========

========TEST========
<?php
        //CURL_MULTI_GETCONTENT TEST

        //CREATE RESOURCES
        $ch1=curl_init();
        $ch2=curl_init();

        //SET URL AND OTHER OPTIONS
        curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
        curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
        curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);

        //CREATE MULTIPLE CURL HANDLE
        $mh=curl_multi_init();

        //ADD THE 2 HANDLES
        curl_multi_add_handle($mh,$ch1);
        curl_multi_add_handle($mh,$ch2);

        //EXECUTE
        $running=0;
        do {
                curl_multi_exec($mh,$running);
        } while ($running>0);

        $results1=curl_multi_getcontent($ch1);
        $results2=curl_multi_getcontent($ch2);

        //CLOSE
        curl_multi_remove_handle($mh,$ch1);
        curl_multi_remove_handle($mh,$ch2);
        curl_multi_close($mh);

        echo $results1;
        echo $results2;

?>
========DONE========

========OUT========
User-agent: *
Disallow: /backend/
Disallow: /distributions/
Disallow: /stats/
Disallow: /source.php
Disallow: /search.php
Disallow: /mod.php
Disallow: /manual/add-note.php

Disallow: /harming/humans
Disallow: /ignoring/human/orders
Disallow: /harm/to/self

CURL2
========DONE========

========EXP========
User-agent: *
Disallow: /backend/
Disallow: /distributions/
Disallow: /stats/
Disallow: /source.php
Disallow: /search.php
Disallow: /mod.php
Disallow: /manual/add-note.php
CURL2
========DONE========

========DIFF========
009+
010+ Disallow: /harming/humans
011+ Disallow: /ignoring/human/orders
012+ Disallow: /harm/to/self
013+
========DONE========
FAIL Curl_multi_getcontent() basic test with different sources (local file/http) [ext/curl/tests/curl_multi_getcontent_basic3.phpt]
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Curl_multi_getcontent() basic test with different sources (local file/http) [ext/curl/tests/curl_multi_getcontent_basic3.phpt]
=====================================================================
make: [test] Error 1 (ignored)



Patches

bug-52533.patch (last revision 2010-08-04 14:06 UTC by glen at delfi dot ee)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-07 00:57 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=301954
Log: - Fixed bug #52533 (ext/curl/tests/curl_multi_getcontent_basic3.phpt broken due php.net/robots.txt)
  patch by: glen at delfi dot ee
 [2010-08-07 00:57 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2010-08-07 00:57 UTC] felipe@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the patch.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC