aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/http/lib/Message.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-05-31 23:12:55 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-06-01 00:08:40 +0200
commitea1997128529965fa92f1a182c2a7ad02b88d3e3 (patch)
treea96be42ef1e00f370bfba8ddf138917b8e0aa581 /vendor/sabre/http/lib/Message.php
parent14229d0dd3205ea1e85d2c26d6c79bd68d19eda3 (diff)
downloadvolse-hubzilla-ea1997128529965fa92f1a182c2a7ad02b88d3e3.tar.gz
volse-hubzilla-ea1997128529965fa92f1a182c2a7ad02b88d3e3.tar.bz2
volse-hubzilla-ea1997128529965fa92f1a182c2a7ad02b88d3e3.zip
:arrow_up:Update Sabre libraries.
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) {