aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/http/lib
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/http/lib')
-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/Sapi.php10
-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
11 files changed, 29 insertions, 20 deletions
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/Sapi.php b/vendor/sabre/http/lib/Sapi.php
index 6c83c8719..6fc6452e4 100644
--- a/vendor/sabre/http/lib/Sapi.php
+++ b/vendor/sabre/http/lib/Sapi.php
@@ -75,7 +75,15 @@ class Sapi {
if ($contentLength !== null) {
$output = fopen('php://output', 'wb');
if (is_resource($body) && get_resource_type($body) == 'stream') {
- stream_copy_to_stream($body, $output, $contentLength);
+ if (PHP_INT_SIZE !== 4){
+ // use the dedicated function on 64 Bit systems
+ stream_copy_to_stream($body, $output, $contentLength);
+ } else {
+ // workaround for 32 Bit systems to avoid stream_copy_to_stream
+ while (!feof($body)) {
+ fwrite($output, fread($body, 8192));
+ }
+ }
} else {
fwrite($output, $body, $contentLength);
}
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..aeb080e93 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.3';
}
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) {