Commit ea199712 authored by Klaus Weidenbach's avatar Klaus Weidenbach
Browse files

:arrow_up:Update Sabre libraries.

parent 14229d0d
This diff is collapsed.
......@@ -593,6 +593,7 @@ return array(
'Sabre\\HTTP\\URLUtil' => $vendorDir . '/sabre/http/lib/URLUtil.php',
'Sabre\\HTTP\\Util' => $vendorDir . '/sabre/http/lib/Util.php',
'Sabre\\HTTP\\Version' => $vendorDir . '/sabre/http/lib/Version.php',
'Sabre\\Uri\\InvalidUriException' => $vendorDir . '/sabre/uri/lib/InvalidUriException.php',
'Sabre\\Uri\\Version' => $vendorDir . '/sabre/uri/lib/Version.php',
'Sabre\\VObject\\BirthdayCalendarGenerator' => $vendorDir . '/sabre/vobject/lib/BirthdayCalendarGenerator.php',
'Sabre\\VObject\\Cli' => $vendorDir . '/sabre/vobject/lib/Cli.php',
......
......@@ -722,6 +722,7 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
'Sabre\\HTTP\\URLUtil' => __DIR__ . '/..' . '/sabre/http/lib/URLUtil.php',
'Sabre\\HTTP\\Util' => __DIR__ . '/..' . '/sabre/http/lib/Util.php',
'Sabre\\HTTP\\Version' => __DIR__ . '/..' . '/sabre/http/lib/Version.php',
'Sabre\\Uri\\InvalidUriException' => __DIR__ . '/..' . '/sabre/uri/lib/InvalidUriException.php',
'Sabre\\Uri\\Version' => __DIR__ . '/..' . '/sabre/uri/lib/Version.php',
'Sabre\\VObject\\BirthdayCalendarGenerator' => __DIR__ . '/..' . '/sabre/vobject/lib/BirthdayCalendarGenerator.php',
'Sabre\\VObject\\Cli' => __DIR__ . '/..' . '/sabre/vobject/lib/Cli.php',
......
[
{
"name": "sabre/uri",
"version": "1.1.0",
"version_normalized": "1.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-uri.git",
"reference": "9012116434d84ef6e5e37a89dfdbfbe2204a8704"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-uri/zipball/9012116434d84ef6e5e37a89dfdbfbe2204a8704",
"reference": "9012116434d84ef6e5e37a89dfdbfbe2204a8704",
"shasum": ""
},
"require": {
"php": ">=5.4.7"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "~0.0.1"
},
"time": "2016-03-08T02:29:27+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\Uri\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "Functions for making sense out of URIs.",
"homepage": "http://sabre.io/uri/",
"keywords": [
"rfc3986",
"uri",
"url"
]
},
{
"name": "sabre/vobject",
"version": "4.1.1",
"version_normalized": "4.1.1.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-vobject.git",
"reference": "a3a59b06947f122af2d45d52b72172cdc1efd68f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/a3a59b06947f122af2d45d52b72172cdc1efd68f",
"reference": "a3a59b06947f122af2d45d52b72172cdc1efd68f",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.5",
"sabre/xml": "~1.1"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "~0.0.3"
},
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
"time": "2016-07-15T19:52:17+00:00",
"bin": [
"bin/vobject",
"bin/generate_vcards"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\VObject\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Dominik Tobschall",
"email": "dominik@fruux.com",
"homepage": "http://tobschall.de/",
"role": "Developer"
},
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net",
"homepage": "http://mnt.io/",
"role": "Developer"
}
],
"description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
"homepage": "http://sabre.io/vobject/",
"keywords": [
"availability",
"freebusy",
"iCalendar",
"ical",
"ics",
"jCal",
"jCard",
"recurrence",
"rfc2425",
"rfc2426",
"rfc2739",
"rfc4770",
"rfc5545",
"rfc5546",
"rfc6321",
"rfc6350",
"rfc6351",
"rfc6474",
"rfc6638",
"rfc6715",
"rfc6868",
"vCalendar",
"vCard",
"vcf",
"xCal",
"xCard"
]
},
{
"name": "sabre/event",
"version": "3.0.0",
......@@ -210,63 +58,6 @@
"signal"
]
},
{
"name": "sabre/http",
"version": "4.2.1",
"version_normalized": "4.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-http.git",
"reference": "2e93bc8321524c67be4ca5b8415daebd4c8bf85e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-http/zipball/2e93bc8321524c67be4ca5b8415daebd4c8bf85e",
"reference": "2e93bc8321524c67be4ca5b8415daebd4c8bf85e",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.4",
"sabre/event": ">=1.0.0,<4.0.0",
"sabre/uri": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.3",
"sabre/cs": "~0.0.1"
},
"suggest": {
"ext-curl": " to make http requests with the Client class"
},
"time": "2016-01-06T23:00:08+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\HTTP\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "The sabre/http library provides utilities for dealing with http requests and responses. ",
"homepage": "https://github.com/fruux/sabre-http",
"keywords": [
"http"
]
},
{
"name": "sabre/xml",
"version": "1.5.0",
......@@ -756,5 +547,215 @@
"html",
"markdown"
]
},
{
"name": "sabre/uri",
"version": "1.2.1",
"version_normalized": "1.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-uri.git",
"reference": "ada354d83579565949d80b2e15593c2371225e61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-uri/zipball/ada354d83579565949d80b2e15593c2371225e61",
"reference": "ada354d83579565949d80b2e15593c2371225e61",
"shasum": ""
},
"require": {
"php": ">=5.4.7"
},
"require-dev": {
"phpunit/phpunit": ">=4.0,<6.0",
"sabre/cs": "~1.0.0"
},
"time": "2017-02-20T19:59:28+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\Uri\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "Functions for making sense out of URIs.",
"homepage": "http://sabre.io/uri/",
"keywords": [
"rfc3986",
"uri",
"url"
]
},
{
"name": "sabre/http",
"version": "4.2.2",
"version_normalized": "4.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-http.git",
"reference": "dd50e7260356f4599d40270826f9548b23efa204"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-http/zipball/dd50e7260356f4599d40270826f9548b23efa204",
"reference": "dd50e7260356f4599d40270826f9548b23efa204",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-mbstring": "*",
"php": ">=5.4",
"sabre/event": ">=1.0.0,<4.0.0",
"sabre/uri": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.3",
"sabre/cs": "~0.0.1"
},
"suggest": {
"ext-curl": " to make http requests with the Client class"
},
"time": "2017-01-02T19:38:42+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
"lib/functions.php"
],
"psr-4": {
"Sabre\\HTTP\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
}
],
"description": "The sabre/http library provides utilities for dealing with http requests and responses. ",
"homepage": "https://github.com/fruux/sabre-http",
"keywords": [
"http"
]
},
{
"name": "sabre/vobject",
"version": "4.1.2",
"version_normalized": "4.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/fruux/sabre-vobject.git",
"reference": "d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c",
"reference": "d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.5",
"sabre/xml": ">=1.5 <3.0"
},
"require-dev": {
"phpunit/phpunit": "*",
"sabre/cs": "^1.0.0"
},
"suggest": {
"hoa/bench": "If you would like to run the benchmark scripts"
},
"time": "2016-12-06T04:14:09+00:00",
"bin": [
"bin/vobject",
"bin/generate_vcards"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Sabre\\VObject\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Evert Pot",
"email": "me@evertpot.com",
"homepage": "http://evertpot.com/",
"role": "Developer"
},
{
"name": "Dominik Tobschall",
"email": "dominik@fruux.com",
"homepage": "http://tobschall.de/",
"role": "Developer"
},
{
"name": "Ivan Enderlin",
"email": "ivan.enderlin@hoa-project.net",
"homepage": "http://mnt.io/",
"role": "Developer"
}
],
"description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
"homepage": "http://sabre.io/vobject/",
"keywords": [
"availability",
"freebusy",
"iCalendar",
"ical",
"ics",
"jCal",
"jCard",
"recurrence",
"rfc2425",
"rfc2426",
"rfc2739",
"rfc4770",
"rfc5545",
"rfc5546",
"rfc6321",
"rfc6350",
"rfc6351",
"rfc6474",
"rfc6638",
"rfc6715",
"rfc6868",
"vCalendar",
"vCard",
"vcf",
"xCal",
"xCard"
]
}
]
......@@ -4,6 +4,7 @@ php:
- 5.5
- 5.6
- 7
- 7.1
- hhvm
matrix:
......@@ -16,7 +17,8 @@ env:
before_script:
- composer self-update
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
# - composer self-update
- composer update --prefer-source $PREFER_LOWEST
script:
......
ChangeLog
=========
4.2.2 (2017-01-02)
------------------
* #72: Handling clients that send invalid `Content-Length` headers.
4.2.1 (2016-01-06)
------------------
* #56: `getBodyAsString` now returns at most as many bytes as the contents of
the `Content-Length` header. This allows users to pass much larger strings
without having to copy and truncate them.
* The client now sets a default `User-Agent` header identifying this library.
4.2.0 (2016-01-04)
------------------
* This package now supports sabre/event 3.0.
* The client now sets a default `User-Agent` header identifying this library.
4.1.0 (2015-09-04)
......
Copyright (C) 2009-2016 fruux GmbH (https://fruux.com/)
Copyright (C) 2009-2017 fruux GmbH (https://fruux.com/)
All rights reserved.
......
......@@ -7,6 +7,7 @@
"require" : {
"php" : ">=5.4",
"ext-mbstring" : "*",
"ext-ctype" : "*",
"sabre/event" : ">=1.0.0,<4.0.0",
"sabre/uri" : "~1.0"
},
......
......@@ -75,12 +75,11 @@ abstract class Message implements MessageInterface {
return '';
}
$contentLength = $this->getHeader('Content-Length');
if (null === $contentLength) {
return stream_get_contents($body);
} else {
if (is_int($contentLength) || ctype_digit($contentLength)) {
return stream_get_contents($body, $contentLength);
} else {
return stream_get_contents($body);
}
}
/**
......@@ -189,7 +188,7 @@ abstract class Message implements MessageInterface {
/**
* Updates a HTTP header.
*
* The case-sensitity of the name value must be retained as-is.
* The case-sensitivity of the name value must be retained as-is.
*
* If the header already existed, it will be overwritten.
*
......@@ -270,10 +269,11 @@ abstract class Message implements MessageInterface {
/**
* Removes a HTTP header.
*
* The specified header name must be treated as case-insenstive.
* The specified header name must be treated as case-insensitive.
* This method should return true if the header was successfully deleted,
* and false if the header did not exist.
*
* @param string $name
* @return bool
*/
function removeHeader($name) {
......
......@@ -144,7 +144,7 @@ trait MessageDecoratorTrait {
/**
* Updates a HTTP header.
*
* The case-sensitity of the name value must be retained as-is.
* The case-sensitivity of the name value must be retained as-is.
*
* If the header already existed, it will be overwritten.
*
......@@ -210,15 +210,16 @@ trait MessageDecoratorTrait {
/**
* Removes a HTTP header.
*
* The specified header name must be treated as case-insenstive.
* The specified header name must be treated as case-insensitive.
* This method should return true if the header was successfully deleted,
* and false if the header did not exist.
*
* @param string $name
* @return bool
*/
function removeHeader($name) {
$this->inner->removeHeader($name);
return $this->inner->removeHeader($name);
}
......
......@@ -44,7 +44,7 @@ interface MessageInterface {
/**
* Updates the body resource with a new stream.
*
* @param resource $body
* @param resource|string $body
* @return void
*/
function setBody($body);
......@@ -153,6 +153,7 @@ interface MessageInterface {
* This method should return true if the header was successfully deleted,
* and false if the header did not exist.
*
* @param string $name
* @return bool
*/
function removeHeader($name);
......
......@@ -301,7 +301,7 @@ class Request extends Message implements RequestInterface {
foreach ($value as $v) {
if ($key === 'Authorization') {
list($v) = explode(' ', $v, 2);
$v .= ' REDACTED';
$v .= ' REDACTED';
}
$out .= $key . ": " . $v . "\r\n";
}
......
......@@ -100,7 +100,6 @@ class Response extends Message implements ResponseInterface {
* @param string|int $status