Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
f763bf3f24 | |
|
c690f05ace | |
|
9a39981096 | |
|
2b8d0f7f6e |
|
@ -2,3 +2,8 @@ clog
|
||||||
/pecl_http-2.3.1.tgz
|
/pecl_http-2.3.1.tgz
|
||||||
/pecl_http-2.3.2.tgz
|
/pecl_http-2.3.2.tgz
|
||||||
/pecl_http-2.4.3.tgz
|
/pecl_http-2.4.3.tgz
|
||||||
|
/pecl_http-2.5.0RC1.tgz
|
||||||
|
/pecl_http-2.5.0.tgz
|
||||||
|
/pecl_http-2.5.1.tgz
|
||||||
|
/pecl_http-2.5.2.tgz
|
||||||
|
/pecl_http-2.5.3.tgz
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
--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
|
|
|
@ -1,4 +1,4 @@
|
||||||
# spec file for php-pecl-http
|
# Fedora spec file for php-pecl-http
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012-2015 Remi Collet
|
# Copyright (c) 2012-2015 Remi Collet
|
||||||
# License: CC-BY-SA
|
# License: CC-BY-SA
|
||||||
|
@ -24,13 +24,14 @@
|
||||||
%endif
|
%endif
|
||||||
%ifarch %{arm}
|
%ifarch %{arm}
|
||||||
# Test suite disabled because of erratic results on slow ARM (timeout)
|
# Test suite disabled because of erratic results on slow ARM (timeout)
|
||||||
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
|
%global with_tests 0%{?_with_tests:1}
|
||||||
%else
|
%else
|
||||||
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
|
%global with_tests 0%{!?_without_tests:1}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
#global prever RC1
|
||||||
Name: php-pecl-http
|
Name: php-pecl-http
|
||||||
Version: 2.4.3
|
Version: 2.5.3
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Extended HTTP support
|
Summary: Extended HTTP support
|
||||||
|
|
||||||
|
@ -42,14 +43,6 @@ Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz
|
||||||
# From http://www.php.net/manual/en/http.configuration.php
|
# From http://www.php.net/manual/en/http.configuration.php
|
||||||
Source1: %{proj_name}.ini
|
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-devel >= 5.3.0
|
||||||
BuildRequires: php-hash
|
BuildRequires: php-hash
|
||||||
BuildRequires: php-iconv
|
BuildRequires: php-iconv
|
||||||
|
@ -59,8 +52,8 @@ BuildRequires: pcre-devel
|
||||||
BuildRequires: zlib-devel >= 1.2.0.4
|
BuildRequires: zlib-devel >= 1.2.0.4
|
||||||
BuildRequires: curl-devel >= 7.18.2
|
BuildRequires: curl-devel >= 7.18.2
|
||||||
BuildRequires: libidn-devel
|
BuildRequires: libidn-devel
|
||||||
BuildRequires: php-pecl-propro-devel
|
BuildRequires: php-pecl-propro-devel >= 1.0.0
|
||||||
BuildRequires: php-pecl-raphf-devel
|
BuildRequires: php-pecl-raphf-devel >= 1.1.0
|
||||||
BuildRequires: libevent-devel >= 1.4
|
BuildRequires: libevent-devel >= 1.4
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
|
||||||
|
@ -77,8 +70,8 @@ Requires: php-hash%{?_isa}
|
||||||
Requires: php-iconv%{?_isa}
|
Requires: php-iconv%{?_isa}
|
||||||
Requires: php-spl%{?_isa}
|
Requires: php-spl%{?_isa}
|
||||||
%endif
|
%endif
|
||||||
Requires: php-pecl(propro)%{?_isa}
|
Requires: php-pecl(propro)%{?_isa} >= 1.0.0
|
||||||
Requires: php-pecl(raphf)%{?_isa}
|
Requires: php-pecl(raphf)%{?_isa} >= 1.1.0
|
||||||
%if 0%{?fedora} < 22
|
%if 0%{?fedora} < 22
|
||||||
# new extensions split off this one.
|
# new extensions split off this one.
|
||||||
Requires: php-pecl(json_post)%{?_isa}
|
Requires: php-pecl(json_post)%{?_isa}
|
||||||
|
@ -148,9 +141,6 @@ These are the files needed to compile programs using HTTP extension.
|
||||||
mv %{proj_name}-%{version}%{?prever} NTS
|
mv %{proj_name}-%{version}%{?prever} NTS
|
||||||
cd 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)
|
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
|
||||||
if test "x${extver}" != "x%{version}%{?prever}"; then
|
if test "x${extver}" != "x%{version}%{?prever}"; then
|
||||||
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
|
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
|
||||||
|
@ -216,11 +206,6 @@ done
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
if pkg-config libcurl --atleast-version=7.42
|
|
||||||
then
|
|
||||||
# Headers order issue with new libcurl
|
|
||||||
rm */tests/{bug69313,client020,client025}.phpt
|
|
||||||
fi
|
|
||||||
%if "%{php_version}" < "5.4"
|
%if "%{php_version}" < "5.4"
|
||||||
# Known failed test with 5.3.3 (need investigations)
|
# Known failed test with 5.3.3 (need investigations)
|
||||||
export REPORT_EXIT_STATUS=0
|
export REPORT_EXIT_STATUS=0
|
||||||
|
@ -303,6 +288,19 @@ fi
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 25 2015 Remi Collet <remi@fedoraproject.org> - 2.5.3-1
|
||||||
|
- Update to 2.5.3 (stable)
|
||||||
|
|
||||||
|
* Thu Sep 10 2015 Remi Collet <remi@fedoraproject.org> - 2.5.2-1
|
||||||
|
- Update to 2.5.2 (stable)
|
||||||
|
|
||||||
|
* Tue Jul 28 2015 Remi Collet <remi@fedoraproject.org> - 2.5.1-1
|
||||||
|
- Update to 2.5.1 (stable)
|
||||||
|
- raise dependency on raphf 1.1.0
|
||||||
|
|
||||||
|
* Wed Jul 15 2015 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
|
||||||
|
- update to 2.5.0
|
||||||
|
|
||||||
* Wed Apr 08 2015 Remi Collet <remi@fedoraproject.org> - 2.4.3-1
|
* Wed Apr 08 2015 Remi Collet <remi@fedoraproject.org> - 2.4.3-1
|
||||||
- Update to 2.4.3
|
- Update to 2.4.3
|
||||||
- add dependencies on pecl/json_post and pecl/apfd (fedora < 22)
|
- add dependencies on pecl/json_post and pecl/apfd (fedora < 22)
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
--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===
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
32be010a0e4b1125c2797fa6c28b8cab pecl_http-2.4.3.tgz
|
faeaefd4c7800bcd9ced0883ebb3b733 pecl_http-2.5.3.tgz
|
||||||
|
|
20
upload.inc
20
upload.inc
|
@ -1,20 +0,0 @@
|
||||||
<?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);
|
|
||||||
});
|
|
Loading…
Reference in New Issue