diff options
author | Mario <mario@mariovavti.com> | 2022-02-11 09:21:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-11 09:21:19 +0000 |
commit | 6d8aabab2347feabdd804b609dcd4513f09f78d4 (patch) | |
tree | 9bea1aba6caa85084ec664f498c445bb92d9457c /vendor/sabre/http/lib/Client.php | |
parent | e74359fcfe4d97efe72a811b45526a69edae3893 (diff) | |
download | volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.tar.gz volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.tar.bz2 volse-hubzilla-6d8aabab2347feabdd804b609dcd4513f09f78d4.zip |
composer libs minor version updates
Diffstat (limited to 'vendor/sabre/http/lib/Client.php')
-rw-r--r-- | vendor/sabre/http/lib/Client.php | 7 |
1 files changed, 6 insertions, 1 deletions
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 |