From: Michael Wallner Date: Mon, 25 Jul 2005 12:51:39 +0000 (+0000) Subject: - release 0.10.0 X-Git-Tag: RELEASE_0_10_0~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c4d95e923b40160d814c7e4e0a822332bbd65bdb;p=m6w6%2Fext-http - release 0.10.0 - update docs --- diff --git a/docs/functions.html b/docs/functions.html index d00adae..100e1f3 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -430,7 +430,7 @@ GET example:


able to send several HttpRequests in parallel.

Example:


-<?php
    $urls
= array('www.php.net', 'pecl.php.net', 'pear.php.net')
    
$pool = new HttpRequestPool;
    foreach (
$urls as $url) {
        
$req[$url] = new HttpRequest("http://$url", HTTP_HEAD);
        
$pool->attach($req[$url]);
    }
    
$pool->send();
    foreach (
$urls as $url) {
        
printf("%s (%s) is %s\n",
            
$url, $req[$url]->getResponseInfo('effective_url'),
            
$r->getResponseCode() == 200 ? 'alive' : 'not alive'
        
);
    }
?>
+<?php
try {
    
$pool = new HttpRequestPool(
        new
HttpRequest('http://www.google.com/', HTTP_HEAD),
        new
HttpRequest('http://www.php.net/', HTTP_HEAD)
    );
    
$pool->send();
    foreach(
$pool as $request) {
        
printf("%s is %s (%d)\n",
            
$request->getUrl(),
            
$request->getResponseCode() ? 'alive' : 'not alive',
            
$request->getResponseCode()
        );
    }
} catch (
HttpException $e) {
    echo
$e;
}
?>



@@ -457,6 +457,16 @@ NOTE: set all options prior attaching!

See HttpRequestPool::socketSend().

protected void HttpRequestPool::socketRead()

See HttpRequestPool::socketSend().

+

bool HttpRequestPool::valid()

+

Implements Iterator::valid().

+

HttpRequest HttpRequestPool::current()

+

Implements Iterator::current().

+

long HttpRequestPool::key()

+

Implements Iterator::key().

+

void HttpRequestPool::next()

+

Implements Iterator::next().

+

void HttpRequestPool::rewind()

+

Implements Iterator::rewind().


http_response_object.c

static bool HttpResponse::setCache(bool cache)

@@ -531,7 +541,7 @@ Example:




-

Generated at: Fri, 22 Jul 2005 17:44:59 +0200

+

Generated at: Mon, 25 Jul 2005 14:47:50 +0200

diff --git a/http_requestpool_object.c b/http_requestpool_object.c index c940f71..e01e26d 100644 --- a/http_requestpool_object.c +++ b/http_requestpool_object.c @@ -159,7 +159,7 @@ void _http_requestpool_object_free(zend_object *object TSRMLS_DC) * $pool->send(); * foreach($pool as $request) { * printf("%s is %s (%d)\n", - * $request->getResponseInfo('effective_url'), + * $request->getUrl(), * $request->getResponseCode() ? 'alive' : 'not alive', * $request->getResponseCode() * ); @@ -330,6 +330,8 @@ PHP_METHOD(HttpRequestPool, socketRead) /* implements Iterator */ /* {{{ proto bool HttpRequestPool::valid() + * + * Implements Iterator::valid(). */ PHP_METHOD(HttpRequestPool, valid) { @@ -343,6 +345,8 @@ PHP_METHOD(HttpRequestPool, valid) /* }}} */ /* {{{ proto HttpRequest HttpRequestPool::current() + * + * Implements Iterator::current(). */ PHP_METHOD(HttpRequestPool, current) { @@ -355,8 +359,8 @@ PHP_METHOD(HttpRequestPool, current) getObject(http_requestpool_object, obj); if (obj->iterator.pos < zend_llist_count(&obj->pool.handles)) { - for ( current = zend_llist_get_first_ex(&obj->pool.handles, &lpos); - current && obj->iterator.pos != pos++; + for ( current = zend_llist_get_first_ex(&obj->pool.handles, &lpos); + current && obj->iterator.pos != pos++; current = zend_llist_get_next_ex(&obj->pool.handles, &lpos)); if (current) { RETURN_OBJECT(*current); @@ -368,6 +372,8 @@ PHP_METHOD(HttpRequestPool, current) /* }}} */ /* {{{ proto long HttpRequestPool::key() + * + * Implements Iterator::key(). */ PHP_METHOD(HttpRequestPool, key) { @@ -381,6 +387,8 @@ PHP_METHOD(HttpRequestPool, key) /* }}} */ /* {{{ proto void HttpRequestPool::next() + * + * Implements Iterator::next(). */ PHP_METHOD(HttpRequestPool, next) { @@ -392,6 +400,8 @@ PHP_METHOD(HttpRequestPool, next) /* }}} */ /* {{{ proto void HttpRequestPool::rewind() + * + * Implements Iterator::rewind(). */ PHP_METHOD(HttpRequestPool, rewind) { diff --git a/package.xml b/package.xml index c9855a6..f238ee9 100644 --- a/package.xml +++ b/package.xml @@ -30,13 +30,14 @@ - 0.10.0dev - 2005-07-00 + 0.10.0 + 2005-07-25 beta @@ -46,6 +47,7 @@ CREDITS EXPERIMENTAL docs/functions.html + KnownIssues.txt http.dsp config.w32 @@ -95,7 +97,56 @@ http_response_object.c http_exception_object.c + + README.txt + run-tests.diff + data.txt + skip.inc + abs_uri_001.phpt + abs_uri_002.phpt + allowed_methods_001.phpt + chunked_decode_001.phpt + date_001.phpt + date_002.phpt + get_request_data_001.phpt + HttpMessage_001.phpt + HttpRequestPool_001.phpt + HttpRequest_001.phpt + HttpRequest_002.phpt + HttpRequest_003.phpt + HttpResponse_001.phpt + HttpResponse_002.phpt + INI_001.phpt + parse_headers_001.phpt + redirect_001.phpt + redirect_002.phpt + redirect_003.phpt + send_data_001.phpt + send_data_002.phpt + send_data_003.phpt + send_data_004.phpt + send_data_005.phpt + send_data_006.phpt + send_data_007.phpt + send_data_008.phpt + send_data_009.phpt + send_file_001.phpt + send_file_002.phpt + send_file_003.phpt + send_file_004.phpt + send_file_005.phpt + send_file_006.phpt + send_file_007.phpt + split_response_001.phpt + split_response_002.phpt + + + + + session + zlib + diff --git a/tests/run-tests.diff b/tests/run-tests.diff index 90b03ae..9295b87 100644 --- a/tests/run-tests.diff +++ b/tests/run-tests.diff @@ -1,24 +1,24 @@ Index: run-tests.php =================================================================== RCS file: /repository/php-src/run-tests.php,v -retrieving revision 1.209 -diff -u -r1.209 run-tests.php ---- run-tests.php 20 Mar 2005 19:47:13 -0000 1.209 -+++ run-tests.php 3 May 2005 06:13:20 -0000 -@@ -836,6 +836,12 @@ +retrieving revision 1.223 +diff -u -r1.223 run-tests.php +--- run-tests.php 18 Jul 2005 00:19:28 -0000 1.223 ++++ run-tests.php 25 Jul 2005 12:28:31 -0000 +@@ -926,6 +926,12 @@ $query_string = ''; } -+ if (!empty($section_text['ENV'])) { -+ foreach (explode("\n", $section_text['ENV']) as $env) { -+ ($env = trim($env)) and putenv($env); -+ } -+ } ++ if (!empty($section_text['ENV'])) { ++ foreach (explode("\n", $section_text['ENV']) as $env) { ++ ($env = trim($env)) and putenv($env); ++ } ++ } + putenv("REDIRECT_STATUS=1"); putenv("QUERY_STRING=$query_string"); putenv("PATH_TRANSLATED=$tmp_file"); -@@ -861,7 +867,7 @@ +@@ -951,7 +957,7 @@ putenv("CONTENT_TYPE="); putenv("CONTENT_LENGTH="); @@ -27,15 +27,16 @@ diff -u -r1.209 run-tests.php } if ($DETAILED) echo " -@@ -878,6 +884,12 @@ +@@ -968,6 +974,13 @@ // $out = `$cmd`; $out = system_with_timeout($cmd); -+ if (!empty($section_text['ENV'])) { -+ foreach (explode("\n", $section_text['ENV']) as $env) { -+ ($env = trim($env)) and putenv(array_shift(explode('=', $env)).'='); -+ } -+ } ++ if (!empty($section_text['ENV'])) { ++ foreach (explode("\n", $section_text['ENV']) as $env) { ++ $env = explode('=', $env); ++ ($env = trim($env)) and putenv($env[0] .'='); ++ } ++ } + @unlink($tmp_post);