aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/http
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/http')
-rw-r--r--vendor/sabre/http/.travis.yml4
-rw-r--r--vendor/sabre/http/CHANGELOG.md8
-rw-r--r--vendor/sabre/http/LICENSE2
-rw-r--r--vendor/sabre/http/composer.json1
-rw-r--r--vendor/sabre/http/lib/Message.php12
-rw-r--r--vendor/sabre/http/lib/MessageDecoratorTrait.php7
-rw-r--r--vendor/sabre/http/lib/MessageInterface.php3
-rw-r--r--vendor/sabre/http/lib/Request.php2
-rw-r--r--vendor/sabre/http/lib/Response.php3
-rw-r--r--vendor/sabre/http/lib/ResponseInterface.php2
-rw-r--r--vendor/sabre/http/lib/URLUtil.php2
-rw-r--r--vendor/sabre/http/lib/Util.php2
-rw-r--r--vendor/sabre/http/lib/Version.php2
-rw-r--r--vendor/sabre/http/lib/functions.php4
14 files changed, 32 insertions, 22 deletions
diff --git a/vendor/sabre/http/.travis.yml b/vendor/sabre/http/.travis.yml
index 490e42e1e..8ae84d90f 100644
--- a/vendor/sabre/http/.travis.yml
+++ b/vendor/sabre/http/.travis.yml
@@ -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:
diff --git a/vendor/sabre/http/CHANGELOG.md b/vendor/sabre/http/CHANGELOG.md
index 9a751d8fb..63d85afe3 100644
--- a/vendor/sabre/http/CHANGELOG.md
+++ b/vendor/sabre/http/CHANGELOG.md
@@ -1,19 +1,25 @@
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)
diff --git a/vendor/sabre/http/LICENSE b/vendor/sabre/http/LICENSE
index 19812ad7a..864041b22 100644
--- a/vendor/sabre/http/LICENSE
+++ b/vendor/sabre/http/LICENSE
@@ -1,4 +1,4 @@
-Copyright (C) 2009-2016 fruux GmbH (https://fruux.com/)
+Copyright (C) 2009-2017 fruux GmbH (https://fruux.com/)
All rights reserved.
diff --git a/vendor/sabre/http/composer.json b/vendor/sabre/http/composer.json
index b061194cf..507d5d28d 100644
--- a/vendor/sabre/http/composer.json
+++ b/vendor/sabre/http/composer.json
@@ -7,6 +7,7 @@
"require" : {
"php" : ">=5.4",
"ext-mbstring" : "*",
+ "ext-ctype" : "*",
"sabre/event" : ">=1.0.0,<4.0.0",
"sabre/uri" : "~1.0"
},
diff --git a/vendor/sabre/http/lib/Message.php b/vendor/sabre/http/lib/Message.php
index 5c6887d8a..45bd18398 100644
--- a/vendor/sabre/http/lib/Message.php
+++ b/vendor/sabre/http/lib/Message.php
@@ -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) {
diff --git a/vendor/sabre/http/lib/MessageDecoratorTrait.php b/vendor/sabre/http/lib/MessageDecoratorTrait.php
index f104af38d..1cb32da22 100644
--- a/vendor/sabre/http/lib/MessageDecoratorTrait.php
+++ b/vendor/sabre/http/lib/MessageDecoratorTrait.php
@@ -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);
}
diff --git a/vendor/sabre/http/lib/MessageInterface.php b/vendor/sabre/http/lib/MessageInterface.php
index 55d8485c1..df55beb2f 100644
--- a/vendor/sabre/http/lib/MessageInterface.php
+++ b/vendor/sabre/http/lib/MessageInterface.php
@@ -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);
diff --git a/vendor/sabre/http/lib/Request.php b/vendor/sabre/http/lib/Request.php
index 8bcaf32a6..dfa3d5b48 100644
--- a/vendor/sabre/http/lib/Request.php
+++ b/vendor/sabre/http/lib/Request.php
@@ -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";
}
diff --git a/vendor/sabre/http/lib/Response.php b/vendor/sabre/http/lib/Response.php
index d2ba6d40d..01920d8d9 100644
--- a/vendor/sabre/http/lib/Response.php
+++ b/vendor/sabre/http/lib/Response.php
@@ -100,7 +100,6 @@ class Response extends Message implements ResponseInterface {
* @param string|int $status
* @param array $headers
* @param resource $body
- * @return void
*/
function __construct($status = null, array $headers = null, $body = null) {
@@ -145,7 +144,7 @@ class Response extends Message implements ResponseInterface {
* added.
*
* @param string|int $status
- * @throws \InvalidArgumentExeption
+ * @throws \InvalidArgumentException
* @return void
*/
function setStatus($status) {
diff --git a/vendor/sabre/http/lib/ResponseInterface.php b/vendor/sabre/http/lib/ResponseInterface.php
index c0ecc35ae..411cdc06c 100644
--- a/vendor/sabre/http/lib/ResponseInterface.php
+++ b/vendor/sabre/http/lib/ResponseInterface.php
@@ -37,7 +37,7 @@ interface ResponseInterface extends MessageInterface {
* added.
*
* @param string|int $status
- * @throws \InvalidArgumentExeption
+ * @throws \InvalidArgumentException
* @return void
*/
function setStatus($status);
diff --git a/vendor/sabre/http/lib/URLUtil.php b/vendor/sabre/http/lib/URLUtil.php
index 474856348..85c0e1150 100644
--- a/vendor/sabre/http/lib/URLUtil.php
+++ b/vendor/sabre/http/lib/URLUtil.php
@@ -10,7 +10,7 @@ use Sabre\URI;
* Note: this class is deprecated. All its functionality moved to functions.php
* or sabre\uri.
*
- * @deprectated
+ * @deprecated
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
diff --git a/vendor/sabre/http/lib/Util.php b/vendor/sabre/http/lib/Util.php
index 83bde50a4..e3f13a645 100644
--- a/vendor/sabre/http/lib/Util.php
+++ b/vendor/sabre/http/lib/Util.php
@@ -31,7 +31,7 @@ class Util {
* Deprecated! Use negotiateContentType.
*
* @deprecated Use \Sabre\HTTP\NegotiateContentType
- * @param string|null $acceptHeader
+ * @param string|null $acceptHeaderValue
* @param array $availableOptions
* @return string|null
*/
diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php
index 789ee4543..a5a427405 100644
--- a/vendor/sabre/http/lib/Version.php
+++ b/vendor/sabre/http/lib/Version.php
@@ -14,6 +14,6 @@ class Version {
/**
* Full version number
*/
- const VERSION = '4.2.1';
+ const VERSION = '4.2.2';
}
diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php
index 1ec123f2e..d94119623 100644
--- a/vendor/sabre/http/lib/functions.php
+++ b/vendor/sabre/http/lib/functions.php
@@ -79,7 +79,7 @@ function toDate(DateTime $dateTime) {
// We need to clone it, as we don't want to affect the existing
// DateTime.
$dateTime = clone $dateTime;
- $dateTime->setTimeZone(new \DateTimeZone('GMT'));
+ $dateTime->setTimezone(new \DateTimeZone('GMT'));
return $dateTime->format('D, d M Y H:i:s \G\M\T');
}
@@ -216,7 +216,7 @@ function negotiateContentType($acceptHeaderValue, array $availableOptions) {
* Parameters are currently discarded. There's no known prefer value that
* uses them.
*
- * @param string|string[] $header
+ * @param string|string[] $input
* @return array
*/
function parsePrefer($input) {