This commit is contained in:
Remi Collet 2015-07-15 15:14:47 +02:00
parent b4263a4215
commit 2b8d0f7f6e
6 changed files with 11 additions and 109 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@ clog
/pecl_http-2.3.1.tgz
/pecl_http-2.3.2.tgz
/pecl_http-2.4.3.tgz
/pecl_http-2.5.0RC1.tgz
/pecl_http-2.5.0.tgz

View File

@ -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

View File

@ -1,4 +1,4 @@
# spec file for php-pecl-http
# Fedora spec file for php-pecl-http
#
# Copyright (c) 2012-2015 Remi Collet
# License: CC-BY-SA
@ -24,13 +24,14 @@
%endif
%ifarch %{arm}
# 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
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global with_tests 0%{!?_without_tests:1}
%endif
#global prever RC1
Name: php-pecl-http
Version: 2.4.3
Version: 2.5.0
Release: 1%{?dist}
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
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
@ -148,9 +141,6 @@ 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}.
@ -216,11 +206,6 @@ done
%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"
# Known failed test with 5.3.3 (need investigations)
export REPORT_EXIT_STATUS=0
@ -303,6 +288,9 @@ fi
%changelog
* 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
- Update to 2.4.3
- add dependencies on pecl/json_post and pecl/apfd (fedora < 22)

View File

@ -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===

View File

@ -1 +1 @@
32be010a0e4b1125c2797fa6c28b8cab pecl_http-2.4.3.tgz
367302919d7c1c86792581ba8ccbdac7 pecl_http-2.5.0.tgz

View File

@ -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);
});