aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/http
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-11 09:21:19 +0000
committerMario <mario@mariovavti.com>2022-02-11 09:21:19 +0000
commit6d8aabab2347feabdd804b609dcd4513f09f78d4 (patch)
tree9bea1aba6caa85084ec664f498c445bb92d9457c /vendor/sabre/http
parente74359fcfe4d97efe72a811b45526a69edae3893 (diff)
downloadvolse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.tar.gz
volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.tar.bz2
volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.zip
composer libs minor version updates
Diffstat (limited to 'vendor/sabre/http')
-rw-r--r--vendor/sabre/http/.travis.yml51
-rw-r--r--vendor/sabre/http/CHANGELOG.md12
-rw-r--r--vendor/sabre/http/composer.json2
-rw-r--r--vendor/sabre/http/lib/Client.php7
-rw-r--r--vendor/sabre/http/lib/Message.php2
-rw-r--r--vendor/sabre/http/lib/Response.php2
-rw-r--r--vendor/sabre/http/lib/Sapi.php1
-rw-r--r--vendor/sabre/http/lib/Version.php2
-rw-r--r--vendor/sabre/http/lib/functions.php4
9 files changed, 25 insertions, 58 deletions
diff --git a/vendor/sabre/http/.travis.yml b/vendor/sabre/http/.travis.yml
deleted file mode 100644
index c93e4ae75..000000000
--- a/vendor/sabre/http/.travis.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-language: php
-sudo: required
-php:
- - 7.1
- - 7.2
- - 7.3
- - 7.4
-
-env:
- global:
- - RUN_PHPCSFIXER="TRUE"
- - RUN_PHPUNIT="TRUE"
- - RUN_PHPSTAN="FALSE"
- matrix:
- - PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
- - PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""
-
-matrix:
- include:
- - name: 'PHP8'
- dist: focal
- php: nightly
- env:
- - RUN_PHPCSFIXER="FALSE"
- - REPORT_COVERAGE="FALSE"
- - name: 'PHPStan'
- php: 7.4
- env:
- - RUN_PHPCSFIXER="FALSE"
- - RUN_PHPUNIT="FALSE"
- - RUN_PHPSTAN="TRUE"
- - REPORT_COVERAGE="FALSE"
- fast_finish: true
-
-cache:
- directories:
- - $HOME/.composer/cache
-
-before_script:
- - if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --dev friendsofphp/php-cs-fixer; fi
- - composer update $PREFER_LOWEST
- - PHP_BIN=$(phpenv which php)
- - sudo $PHP_BIN -S localhost:80 -t $TRAVIS_BUILD_DIR/tests/www 2>/dev/null &
-
-script:
- - if [ $RUN_PHPCSFIXER == "TRUE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
- - if [ $RUN_PHPUNIT == "TRUE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
- - if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi
-
-after_success:
- - if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi
diff --git a/vendor/sabre/http/CHANGELOG.md b/vendor/sabre/http/CHANGELOG.md
index eb226f7a5..4db8cc772 100644
--- a/vendor/sabre/http/CHANGELOG.md
+++ b/vendor/sabre/http/CHANGELOG.md
@@ -1,6 +1,18 @@
ChangeLog
=========
+5.1.3 (2021-11-04)
+------------------
+
+* #179 version bump that was missed in 5.1.2 (@phil-davis)
+
+5.1.2 (2021-11-04)
+-------------------------
+
+* #169 Ensure $_SERVER keys are read as strings (@fredrik-eriksson)
+* #170 Fix deprecated usages on PHP 8.1 (@cedric-anne)
+* #175 Add resource size to CURL options in client (from #172 ) (@Dartui)
+
5.1.1 (2020-10-03)
-------------------------
diff --git a/vendor/sabre/http/composer.json b/vendor/sabre/http/composer.json
index 7f54df6e8..353646a28 100644
--- a/vendor/sabre/http/composer.json
+++ b/vendor/sabre/http/composer.json
@@ -13,7 +13,7 @@
"sabre/uri" : "^2.0"
},
"require-dev" : {
- "friendsofphp/php-cs-fixer": "~2.16.1",
+ "friendsofphp/php-cs-fixer": "~2.17.1",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
},
diff --git a/vendor/sabre/http/lib/Client.php b/vendor/sabre/http/lib/Client.php
index b79c564da..99ffcf8cb 100644
--- a/vendor/sabre/http/lib/Client.php
+++ b/vendor/sabre/http/lib/Client.php
@@ -376,11 +376,16 @@ class Client extends EventEmitter
default:
$body = $request->getBody();
if (is_resource($body)) {
+ $bodyStat = fstat($body);
+
// This needs to be set to PUT, regardless of the actual
// method used. Without it, INFILE will be ignored for some
// reason.
$settings[CURLOPT_PUT] = true;
- $settings[CURLOPT_INFILE] = $request->getBody();
+ $settings[CURLOPT_INFILE] = $body;
+ if (false !== $bodyStat && array_key_exists('size', $bodyStat)) {
+ $settings[CURLOPT_INFILESIZE] = $bodyStat['size'];
+ }
} else {
// For security we cast this to a string. If somehow an array could
// be passed here, it would be possible for an attacker to use @ to
diff --git a/vendor/sabre/http/lib/Message.php b/vendor/sabre/http/lib/Message.php
index 90153fda5..6474f38d2 100644
--- a/vendor/sabre/http/lib/Message.php
+++ b/vendor/sabre/http/lib/Message.php
@@ -88,7 +88,7 @@ abstract class Message implements MessageInterface
* @var string|int|null
*/
$contentLength = $this->getHeader('Content-Length');
- if (is_int($contentLength) || ctype_digit($contentLength)) {
+ if (null !== $contentLength && (is_int($contentLength) || ctype_digit($contentLength))) {
return stream_get_contents($body, (int) $contentLength);
}
diff --git a/vendor/sabre/http/lib/Response.php b/vendor/sabre/http/lib/Response.php
index 64dfbc0b2..2369bb41e 100644
--- a/vendor/sabre/http/lib/Response.php
+++ b/vendor/sabre/http/lib/Response.php
@@ -149,7 +149,7 @@ class Response extends Message implements ResponseInterface
*/
public function setStatus($status)
{
- if (ctype_digit($status) || is_int($status)) {
+ if (is_int($status) || ctype_digit($status)) {
$statusCode = $status;
$statusText = self::$statusCodes[$status] ?? 'Unknown';
} else {
diff --git a/vendor/sabre/http/lib/Sapi.php b/vendor/sabre/http/lib/Sapi.php
index 73674a5a1..823d5df25 100644
--- a/vendor/sabre/http/lib/Sapi.php
+++ b/vendor/sabre/http/lib/Sapi.php
@@ -154,6 +154,7 @@ class Sapi
$hostName = 'localhost';
foreach ($serverArray as $key => $value) {
+ $key = (string) $key;
switch ($key) {
case 'SERVER_PROTOCOL':
if ('HTTP/1.0' === $value) {
diff --git a/vendor/sabre/http/lib/Version.php b/vendor/sabre/http/lib/Version.php
index 624e2a78e..f182979c6 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.1';
+ const VERSION = '5.1.3';
}
diff --git a/vendor/sabre/http/lib/functions.php b/vendor/sabre/http/lib/functions.php
index a23840a1a..97673da46 100644
--- a/vendor/sabre/http/lib/functions.php
+++ b/vendor/sabre/http/lib/functions.php
@@ -331,8 +331,8 @@ function parseMimeType(string $str): array
if (2 !== count($mimeType)) {
// Illegal value
var_dump($mimeType);
- die();
- throw new InvalidArgumentException('Not a valid mime-type: '.$str);
+ exit();
+ // throw new InvalidArgumentException('Not a valid mime-type: '.$str);
}
list($type, $subType) = $mimeType;