remi pushed to php-pecl-http (master). "- Update to 2.4.3 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sun Apr 26 16:32:12 UTC 2015


>From 51e144bf574ef0b2455d9cee560afcfe74bede6b Mon Sep 17 00:00:00 2001
From: Remi Collet <remi at fedoraproject.org>
Date: Sun, 26 Apr 2015 18:31:52 +0200
Subject: - Update to 2.4.3 - add dependencies on pecl/json_post and pecl/apfd
 (fedora < 22) - drop dependency on json - temporarily disable 2 tests broken
 by new libcurl (Koschei)


diff --git a/.gitignore b/.gitignore
index 5155778..0b6f8b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 clog
 /pecl_http-2.3.1.tgz
 /pecl_http-2.3.2.tgz
+/pecl_http-2.4.3.tgz
diff --git a/bug69313.phpt b/bug69313.phpt
new file mode 100644
index 0000000..824918c
--- /dev/null
+++ b/bug69313.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #69313 (http\Client doesn't send GET body)
+--SKIPIF--
+<?php
+include "./skipif.inc";
+skip_client_test();
+?>
+--FILE--
+<?php
+
+
+include "helper/server.inc";
+
+echo "Test\n";
+
+server("proxy.inc", function($port, $stdin, $stdout, $stderr) {
+	$request = new http\Client\Request("GET", "http://localhost:$port/");
+	$request->setHeader("Content-Type", "text/plain");
+	$request->getBody()->append("foo");
+	$client = new http\Client();
+	$client->enqueue($request);
+	$client->send();
+	echo $client->getResponse();
+});
+
+?>
+
+Done
+--EXPECTF--
+Test
+HTTP/1.1 200 OK
+Accept-Ranges: bytes
+Etag: "%s"
+X-Original-Transfer-Encoding: chunked
+Content-Length: %d
+
+GET / HTTP/1.1
+User-Agent: %s
+Host: localhost:%d
+Accept: */*
+Content-Type: text/plain
+Content-Length: 3
+X-Original-Content-Length: 3
+
+foo
+Done
diff --git a/php-pecl-http.spec b/php-pecl-http.spec
index 9bdcc9f..553841f 100644
--- a/php-pecl-http.spec
+++ b/php-pecl-http.spec
@@ -16,10 +16,10 @@
 %global pecl_name http
 %global with_zts  0%{?__ztsphp:1}
 %if "%{php_version}" < "5.6"
-# after json hash iconv propro raphf
+# after hash iconv propro raphf
 %global ini_name  z-%{pecl_name}.ini
 %else
-# after 40-json 20-iconv 40-propro 40-raphf
+# after 20-iconv 40-propro 40-raphf
 %global ini_name  50-%{pecl_name}.ini
 %endif
 %ifarch %{arm}
@@ -30,7 +30,7 @@
 %endif
 
 Name:           php-pecl-http
-Version:        2.3.2
+Version:        2.4.3
 Release:        1%{?dist}
 Summary:        Extended HTTP support
 
@@ -42,10 +42,17 @@ Source0:        http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz
 # From http://www.php.net/manual/en/http.configuration.php
 Source1:        %{proj_name}.ini
 
+# http://git.php.net/?p=pecl/http/pecl_http.git;a=blob_plain;f=tests/helper/upload.inc;hb=HEAD
+# See http://git.php.net/?p=pecl/http/pecl_http.git;a=commit;h=5c5ee386409f5b6d697c483edc788d09f8c8aeb3
+Source2:        upload.inc
+# http://git.php.net/?p=pecl/http/pecl_http.git;a=blob_plain;f=tests/querystring003.phpt;hb=HEAD
+Source3:        querystring003.phpt
+# http://git.php.net/?p=pecl/http/pecl_http.git;a=blob_plain;f=tests/bug69313.phpt;hb=HEAD
+Source4:        bug69313.phpt
+
 BuildRequires:  php-devel >= 5.3.0
 BuildRequires:  php-hash
 BuildRequires:  php-iconv
-BuildRequires:  php-json
 BuildRequires:  php-spl
 BuildRequires:  php-pear
 BuildRequires:  pcre-devel
@@ -67,11 +74,15 @@ Requires:       php-common%{?_isa}
 %else
 Requires:       php-hash%{?_isa}
 Requires:       php-iconv%{?_isa}
-Requires:       php-json%{?_isa}
 Requires:       php-spl%{?_isa}
 %endif
 Requires:       php-pecl(propro)%{?_isa}
 Requires:       php-pecl(raphf)%{?_isa}
+%if 0%{?fedora} < 22
+# new extensions split off this one.
+Requires:       php-pecl(json_post)%{?_isa}
+Requires:       php-pecl(apfd)%{?_isa}
+%endif
 %if "%{php_version}" > "5.6"
 # V1 don't support PHP 5.6 https://bugs.php.net/66879
 Obsoletes:      php-pecl-http1 < 2
@@ -136,6 +147,9 @@ These are the files needed to compile programs using HTTP extension.
 mv %{proj_name}-%{version}%{?prever} NTS
 cd NTS
 
+cp %{SOURCE2} tests/helper/
+cp %{SOURCE3} %{SOURCE4} tests/
+
 extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
 if test "x${extver}" != "x%{version}%{?prever}"; then
    : Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
@@ -182,7 +196,7 @@ make -C NTS install INSTALL_ROOT=%{buildroot}
 # Install XML package description
 install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
 
-# install config file (z-http.ini to be loaded after json)
+# install config file
 install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
 
 %if %{with_zts}
@@ -201,6 +215,10 @@ done
 
 
 %check
+%if 0%{?fedora} > 22
+# Headers order issue with new libcurl
+rm */tests/{bug69313,client020,client025}.phpt
+%endif
 %if "%{php_version}" < "5.4"
 # Known failed test with 5.3.3 (need investigations)
 export REPORT_EXIT_STATUS=0
@@ -210,7 +228,7 @@ export REPORT_EXIT_STATUS=1
 
 # Shared needed extensions
 modules=""
-for mod in json hash iconv propro raphf; do
+for mod in hash iconv propro raphf; do
   if [ -f %{php_extdir}/${mod}.so ]; then
     modules="$modules -d extension=${mod}.so"
   fi
@@ -283,6 +301,12 @@ fi
 
 
 %changelog
+* Wed Apr 08 2015 Remi Collet <remi at fedoraproject.org> - 2.4.3-1
+- Update to 2.4.3
+- add dependencies on pecl/json_post and pecl/apfd (fedora < 22)
+- drop dependency on json
+- temporarily disable 2 tests broken by new libcurl (Koschei)
+
 * Thu Mar 12 2015 Remi Collet <remi at fedoraproject.org> - 2.3.2-1
 - Update to 2.3.2
 - disable test suite on slow ARM builder
diff --git a/querystring003.phpt b/querystring003.phpt
new file mode 100644
index 0000000..a504174
--- /dev/null
+++ b/querystring003.phpt
@@ -0,0 +1,22 @@
+--TEST--
+querystring offset set
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+
+echo "Test\n";
+
+$qs = new http\QueryString("foo=bar&bar=baz");
+echo $qs,"\n";
+$qs["foo"] = "baz";
+echo $qs,"\n";
+?>
+===DONE===
+--EXPECT--
+Test
+foo=bar&bar=baz
+foo=baz&bar=baz
+===DONE===
diff --git a/sources b/sources
index b594da0..34d325a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f6f7e65a98acb48d7572f21a2249f23c  pecl_http-2.3.2.tgz
+32be010a0e4b1125c2797fa6c28b8cab  pecl_http-2.4.3.tgz
diff --git a/upload.inc b/upload.inc
new file mode 100644
index 0000000..9502d2b
--- /dev/null
+++ b/upload.inc
@@ -0,0 +1,20 @@
+<?php 
+
+include "server.inc";
+
+serve(function($client) {
+	$request = new http\Message($client, false);
+	
+	if ($request->getHeader("Expect") === "100-continue") {
+		$response = new http\Env\Response;
+		$response->setEnvRequest($request);
+		$response->setResponseCode(100);
+		$response->send($client);
+	}
+	
+	/* return the initial message as response body */
+	$response = new http\Env\Response;
+	/* avoid OOM with $response->getBody()->append($request); */
+	$request->toStream($response->getBody()->getResource());
+	$response->send($client);
+});
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/php-pecl-http.git/commit/?h=master&id=51e144bf574ef0b2455d9cee560afcfe74bede6b


More information about the scm-commits mailing list