From 544ef3bc588d4180d7ecad15bdacd43813a7c5c5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 12 Dec 2019 14:51:10 +0000 Subject: update composer libs and minor notifications display fixes --- vendor/sabre/http/lib/Sapi.php | 12 ++++++++++-- vendor/sabre/http/lib/Version.php | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'vendor/sabre/http/lib') diff --git a/vendor/sabre/http/lib/Sapi.php b/vendor/sabre/http/lib/Sapi.php index 80254f3f3..73674a5a1 100644 --- a/vendor/sabre/http/lib/Sapi.php +++ b/vendor/sabre/http/lib/Sapi.php @@ -99,7 +99,7 @@ class Sapi // If this is a partial response, flush the beginning bytes until the first position that is a multiple of the page size. $contentRange = $response->getHeader('Content-Range'); // Matching "Content-Range: bytes 1234-5678/7890" - if (null !== $contentRange && preg_match('/^bytes\s([0-9]*)-([0-9]*)\//i', $contentRange, $matches) && '' !== $matches[1]) { + if (null !== $contentRange && preg_match('/^bytes\s([0-9]+)-([0-9]+)\//i', $contentRange, $matches)) { // 4kB should be the default page size on most architectures $pageSize = 4096; $offset = (int) $matches[1]; @@ -109,7 +109,15 @@ class Sapi } } while ($left > 0) { - $left -= stream_copy_to_stream($body, $output, min($left, $chunk_size)); + $copied = stream_copy_to_stream($body, $output, min($left, $chunk_size)); + // stream_copy_to_stream($src, $dest, $maxLength) must return the number of bytes copied or false in case of failure + // But when the $maxLength is greater than the total number of bytes remaining in the stream, + // It returns the negative number of bytes copied + // So break the loop in such cases. + if ($copied <= 0) { + break; + } + $left -= $copied; } } else { // workaround for 32 Bit systems to avoid stream_copy_to_stream diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php index 20a401773..655753acf 100644 --- a/vendor/sabre/http/lib/Version.php +++ b/vendor/sabre/http/lib/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - const VERSION = '5.0.4'; + const VERSION = '5.0.5'; } -- cgit v1.2.3 From dbfe748d274f6843fc91a3071df7be45c4ab5b00 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 7 May 2020 15:22:25 +0000 Subject: composer updates --- vendor/sabre/http/lib/Client.php | 2 -- vendor/sabre/http/lib/Message.php | 2 -- vendor/sabre/http/lib/MessageDecoratorTrait.php | 2 -- vendor/sabre/http/lib/MessageInterface.php | 2 -- vendor/sabre/http/lib/ResponseDecorator.php | 2 -- vendor/sabre/http/lib/Version.php | 2 +- vendor/sabre/http/lib/functions.php | 15 +-------------- 7 files changed, 2 insertions(+), 25 deletions(-) (limited to 'vendor/sabre/http/lib') diff --git a/vendor/sabre/http/lib/Client.php b/vendor/sabre/http/lib/Client.php index 48862e7da..b79c564da 100644 --- a/vendor/sabre/http/lib/Client.php +++ b/vendor/sabre/http/lib/Client.php @@ -450,8 +450,6 @@ class Client extends EventEmitter * * http_code - HTTP status code, as an int. Only set if Only set if * status is STATUS_SUCCESS, or STATUS_HTTPERROR * - * @param array $headerLines - * @param string $body * @param resource $curlHandle */ protected function parseCurlResponse(array $headerLines, string $body, $curlHandle): array diff --git a/vendor/sabre/http/lib/Message.php b/vendor/sabre/http/lib/Message.php index fc34f8d7f..90153fda5 100644 --- a/vendor/sabre/http/lib/Message.php +++ b/vendor/sabre/http/lib/Message.php @@ -283,8 +283,6 @@ abstract class Message implements MessageInterface /** * Returns the HTTP version. - * - * @return string */ public function getHttpVersion(): string { diff --git a/vendor/sabre/http/lib/MessageDecoratorTrait.php b/vendor/sabre/http/lib/MessageDecoratorTrait.php index d5504ac78..6f49dadfc 100644 --- a/vendor/sabre/http/lib/MessageDecoratorTrait.php +++ b/vendor/sabre/http/lib/MessageDecoratorTrait.php @@ -180,8 +180,6 @@ trait MessageDecoratorTrait * 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. - * - * @return bool */ public function removeHeader(string $name): bool { diff --git a/vendor/sabre/http/lib/MessageInterface.php b/vendor/sabre/http/lib/MessageInterface.php index 8070845d9..8504f0f59 100644 --- a/vendor/sabre/http/lib/MessageInterface.php +++ b/vendor/sabre/http/lib/MessageInterface.php @@ -29,8 +29,6 @@ interface MessageInterface * * Note that because the underlying data may be based on a stream, this * method could only work correctly the first time. - * - * @return string */ public function getBodyAsString(): string; diff --git a/vendor/sabre/http/lib/ResponseDecorator.php b/vendor/sabre/http/lib/ResponseDecorator.php index 289dba5cc..5f9fe7c65 100644 --- a/vendor/sabre/http/lib/ResponseDecorator.php +++ b/vendor/sabre/http/lib/ResponseDecorator.php @@ -64,8 +64,6 @@ class ResponseDecorator implements ResponseInterface * Serializes the request object as a string. * * This is useful for debugging purposes. - * - * @return string */ public function __toString(): string { diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php index 655753acf..8946a46a6 100644 --- a/vendor/sabre/http/lib/Version.php +++ b/vendor/sabre/http/lib/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - const VERSION = '5.0.5'; + const VERSION = '5.1.0'; } diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php index 197a9e661..a23840a1a 100644 --- a/vendor/sabre/http/lib/functions.php +++ b/vendor/sabre/http/lib/functions.php @@ -29,8 +29,6 @@ use InvalidArgumentException; * See: * http://tools.ietf.org/html/rfc7231#section-7.1.1.1 * - * @param string $dateString - * * @return bool|DateTime */ function parseDate(string $dateString) @@ -75,10 +73,6 @@ function parseDate(string $dateString) /** * Transforms a DateTime object to a valid HTTP/1.1 Date header value. - * - * @param DateTime $dateTime - * - * @return string */ function toDate(DateTime $dateTime): string { @@ -107,7 +101,6 @@ function toDate(DateTime $dateTime): string * implying that no accept header was sent. * * @param string|null $acceptHeaderValue - * @param array $availableOptions * * @return string|null */ @@ -218,8 +211,6 @@ function negotiateContentType($acceptHeaderValue, array $availableOptions) * uses them. * * @param string|string[] $input - * - * @return array */ function parsePrefer($input): array { @@ -303,7 +294,7 @@ function getHeaderValues($values, $values2 = null): array $values = array_merge($values, (array) $values2); } - $result = array(); + $result = []; foreach ($values as $l1) { foreach (explode(',', $l1) as $l2) { $result[] = trim($l2); @@ -320,10 +311,6 @@ function getHeaderValues($values, $values2 = null): array * 2. subtype * 3. quality * 4. parameters - * - * @param string $str - * - * @return array */ function parseMimeType(string $str): array { -- cgit v1.2.3 From fae70bf0a7f1b566d25e30064f60d58ab150951a Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 7 May 2020 23:35:02 +0200 Subject: Revert "composer updates" This reverts commit dbfe748d274f6843fc91a3071df7be45c4ab5b00 --- vendor/sabre/http/lib/Client.php | 2 ++ vendor/sabre/http/lib/Message.php | 2 ++ vendor/sabre/http/lib/MessageDecoratorTrait.php | 2 ++ vendor/sabre/http/lib/MessageInterface.php | 2 ++ vendor/sabre/http/lib/ResponseDecorator.php | 2 ++ vendor/sabre/http/lib/Version.php | 2 +- vendor/sabre/http/lib/functions.php | 15 ++++++++++++++- 7 files changed, 25 insertions(+), 2 deletions(-) (limited to 'vendor/sabre/http/lib') diff --git a/vendor/sabre/http/lib/Client.php b/vendor/sabre/http/lib/Client.php index b79c564da..48862e7da 100644 --- a/vendor/sabre/http/lib/Client.php +++ b/vendor/sabre/http/lib/Client.php @@ -450,6 +450,8 @@ class Client extends EventEmitter * * http_code - HTTP status code, as an int. Only set if Only set if * status is STATUS_SUCCESS, or STATUS_HTTPERROR * + * @param array $headerLines + * @param string $body * @param resource $curlHandle */ protected function parseCurlResponse(array $headerLines, string $body, $curlHandle): array diff --git a/vendor/sabre/http/lib/Message.php b/vendor/sabre/http/lib/Message.php index 90153fda5..fc34f8d7f 100644 --- a/vendor/sabre/http/lib/Message.php +++ b/vendor/sabre/http/lib/Message.php @@ -283,6 +283,8 @@ abstract class Message implements MessageInterface /** * Returns the HTTP version. + * + * @return string */ public function getHttpVersion(): string { diff --git a/vendor/sabre/http/lib/MessageDecoratorTrait.php b/vendor/sabre/http/lib/MessageDecoratorTrait.php index 6f49dadfc..d5504ac78 100644 --- a/vendor/sabre/http/lib/MessageDecoratorTrait.php +++ b/vendor/sabre/http/lib/MessageDecoratorTrait.php @@ -180,6 +180,8 @@ trait MessageDecoratorTrait * 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. + * + * @return bool */ public function removeHeader(string $name): bool { diff --git a/vendor/sabre/http/lib/MessageInterface.php b/vendor/sabre/http/lib/MessageInterface.php index 8504f0f59..8070845d9 100644 --- a/vendor/sabre/http/lib/MessageInterface.php +++ b/vendor/sabre/http/lib/MessageInterface.php @@ -29,6 +29,8 @@ interface MessageInterface * * Note that because the underlying data may be based on a stream, this * method could only work correctly the first time. + * + * @return string */ public function getBodyAsString(): string; diff --git a/vendor/sabre/http/lib/ResponseDecorator.php b/vendor/sabre/http/lib/ResponseDecorator.php index 5f9fe7c65..289dba5cc 100644 --- a/vendor/sabre/http/lib/ResponseDecorator.php +++ b/vendor/sabre/http/lib/ResponseDecorator.php @@ -64,6 +64,8 @@ class ResponseDecorator implements ResponseInterface * Serializes the request object as a string. * * This is useful for debugging purposes. + * + * @return string */ public function __toString(): string { diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php index 8946a46a6..655753acf 100644 --- a/vendor/sabre/http/lib/Version.php +++ b/vendor/sabre/http/lib/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - const VERSION = '5.1.0'; + const VERSION = '5.0.5'; } diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php index a23840a1a..197a9e661 100644 --- a/vendor/sabre/http/lib/functions.php +++ b/vendor/sabre/http/lib/functions.php @@ -29,6 +29,8 @@ use InvalidArgumentException; * See: * http://tools.ietf.org/html/rfc7231#section-7.1.1.1 * + * @param string $dateString + * * @return bool|DateTime */ function parseDate(string $dateString) @@ -73,6 +75,10 @@ function parseDate(string $dateString) /** * Transforms a DateTime object to a valid HTTP/1.1 Date header value. + * + * @param DateTime $dateTime + * + * @return string */ function toDate(DateTime $dateTime): string { @@ -101,6 +107,7 @@ function toDate(DateTime $dateTime): string * implying that no accept header was sent. * * @param string|null $acceptHeaderValue + * @param array $availableOptions * * @return string|null */ @@ -211,6 +218,8 @@ function negotiateContentType($acceptHeaderValue, array $availableOptions) * uses them. * * @param string|string[] $input + * + * @return array */ function parsePrefer($input): array { @@ -294,7 +303,7 @@ function getHeaderValues($values, $values2 = null): array $values = array_merge($values, (array) $values2); } - $result = []; + $result = array(); foreach ($values as $l1) { foreach (explode(',', $l1) as $l2) { $result[] = trim($l2); @@ -311,6 +320,10 @@ function getHeaderValues($values, $values2 = null): array * 2. subtype * 3. quality * 4. parameters + * + * @param string $str + * + * @return array */ function parseMimeType(string $str): array { -- cgit v1.2.3 From f132436af3c90cff8dcef852bd836546311036f3 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 7 May 2020 21:48:26 +0000 Subject: composer updates 2 --- vendor/sabre/http/lib/Client.php | 2 -- vendor/sabre/http/lib/Message.php | 2 -- vendor/sabre/http/lib/MessageDecoratorTrait.php | 2 -- vendor/sabre/http/lib/MessageInterface.php | 2 -- vendor/sabre/http/lib/ResponseDecorator.php | 2 -- vendor/sabre/http/lib/Version.php | 2 +- vendor/sabre/http/lib/functions.php | 15 +-------------- 7 files changed, 2 insertions(+), 25 deletions(-) (limited to 'vendor/sabre/http/lib') diff --git a/vendor/sabre/http/lib/Client.php b/vendor/sabre/http/lib/Client.php index 48862e7da..b79c564da 100644 --- a/vendor/sabre/http/lib/Client.php +++ b/vendor/sabre/http/lib/Client.php @@ -450,8 +450,6 @@ class Client extends EventEmitter * * http_code - HTTP status code, as an int. Only set if Only set if * status is STATUS_SUCCESS, or STATUS_HTTPERROR * - * @param array $headerLines - * @param string $body * @param resource $curlHandle */ protected function parseCurlResponse(array $headerLines, string $body, $curlHandle): array diff --git a/vendor/sabre/http/lib/Message.php b/vendor/sabre/http/lib/Message.php index fc34f8d7f..90153fda5 100644 --- a/vendor/sabre/http/lib/Message.php +++ b/vendor/sabre/http/lib/Message.php @@ -283,8 +283,6 @@ abstract class Message implements MessageInterface /** * Returns the HTTP version. - * - * @return string */ public function getHttpVersion(): string { diff --git a/vendor/sabre/http/lib/MessageDecoratorTrait.php b/vendor/sabre/http/lib/MessageDecoratorTrait.php index d5504ac78..6f49dadfc 100644 --- a/vendor/sabre/http/lib/MessageDecoratorTrait.php +++ b/vendor/sabre/http/lib/MessageDecoratorTrait.php @@ -180,8 +180,6 @@ trait MessageDecoratorTrait * 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. - * - * @return bool */ public function removeHeader(string $name): bool { diff --git a/vendor/sabre/http/lib/MessageInterface.php b/vendor/sabre/http/lib/MessageInterface.php index 8070845d9..8504f0f59 100644 --- a/vendor/sabre/http/lib/MessageInterface.php +++ b/vendor/sabre/http/lib/MessageInterface.php @@ -29,8 +29,6 @@ interface MessageInterface * * Note that because the underlying data may be based on a stream, this * method could only work correctly the first time. - * - * @return string */ public function getBodyAsString(): string; diff --git a/vendor/sabre/http/lib/ResponseDecorator.php b/vendor/sabre/http/lib/ResponseDecorator.php index 289dba5cc..5f9fe7c65 100644 --- a/vendor/sabre/http/lib/ResponseDecorator.php +++ b/vendor/sabre/http/lib/ResponseDecorator.php @@ -64,8 +64,6 @@ class ResponseDecorator implements ResponseInterface * Serializes the request object as a string. * * This is useful for debugging purposes. - * - * @return string */ public function __toString(): string { diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php index 655753acf..8946a46a6 100644 --- a/vendor/sabre/http/lib/Version.php +++ b/vendor/sabre/http/lib/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - const VERSION = '5.0.5'; + const VERSION = '5.1.0'; } diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php index 197a9e661..a23840a1a 100644 --- a/vendor/sabre/http/lib/functions.php +++ b/vendor/sabre/http/lib/functions.php @@ -29,8 +29,6 @@ use InvalidArgumentException; * See: * http://tools.ietf.org/html/rfc7231#section-7.1.1.1 * - * @param string $dateString - * * @return bool|DateTime */ function parseDate(string $dateString) @@ -75,10 +73,6 @@ function parseDate(string $dateString) /** * Transforms a DateTime object to a valid HTTP/1.1 Date header value. - * - * @param DateTime $dateTime - * - * @return string */ function toDate(DateTime $dateTime): string { @@ -107,7 +101,6 @@ function toDate(DateTime $dateTime): string * implying that no accept header was sent. * * @param string|null $acceptHeaderValue - * @param array $availableOptions * * @return string|null */ @@ -218,8 +211,6 @@ function negotiateContentType($acceptHeaderValue, array $availableOptions) * uses them. * * @param string|string[] $input - * - * @return array */ function parsePrefer($input): array { @@ -303,7 +294,7 @@ function getHeaderValues($values, $values2 = null): array $values = array_merge($values, (array) $values2); } - $result = array(); + $result = []; foreach ($values as $l1) { foreach (explode(',', $l1) as $l2) { $result[] = trim($l2); @@ -320,10 +311,6 @@ function getHeaderValues($values, $values2 = null): array * 2. subtype * 3. quality * 4. parameters - * - * @param string $str - * - * @return array */ function parseMimeType(string $str): array { -- cgit v1.2.3