aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/http/lib/Message.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-08-16 10:32:35 +0200
committerMario Vavti <mario@mariovavti.com>2017-08-16 10:32:35 +0200
commit4a7384bc0ce1893a432bf4b7d67bca23796fe9db (patch)
tree5623c66a3f66445284529d6207e4ab4a2edb2810 /vendor/sabre/http/lib/Message.php
parentc664a4bdcd1bd578f5ec3c2884f7c97e9f68d2d7 (diff)
parent90bc21f2d560d879d7eaf05a85af6d6dca53ebac (diff)
downloadvolse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.tar.gz
volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.tar.bz2
volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.zip
Merge branch '2.6RC'2.6
Diffstat (limited to 'vendor/sabre/http/lib/Message.php')
-rw-r--r--vendor/sabre/http/lib/Message.php12
1 files changed, 6 insertions, 6 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) {