From: Tim Düsterhus Date: Thu, 20 Mar 2014 23:51:08 +0000 (+0100) Subject: Fix content length check in HTTPRequest.class.php X-Git-Tag: 2.1.0_Alpha_1~992 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8009cc11264a3b44c7a2bd782af1b7c80662e9dc;p=GitHub%2FWoltLab%2FWCF.git Fix content length check in HTTPRequest.class.php --- diff --git a/wcfsetup/install/files/lib/util/HTTPRequest.class.php b/wcfsetup/install/files/lib/util/HTTPRequest.class.php index fc3b61f8d4..a0257f9ccd 100644 --- a/wcfsetup/install/files/lib/util/HTTPRequest.class.php +++ b/wcfsetup/install/files/lib/util/HTTPRequest.class.php @@ -366,7 +366,7 @@ final class HTTPRequest { // non-identity transfer-coding. If the message does include a non- // identity transfer-coding, the Content-Length MUST be ignored. if (isset($this->replyHeaders['content-length']) && (!isset($this->replyHeaders['transfer-encoding']) || strtolower(end($this->replyHeaders['transfer-encoding'])) !== 'identity') && !isset($this->options['maxLength'])) { - if (strlen($this->replyBody) != $this->replyHeaders['content-length']) { + if (strlen($this->replyBody) != end($this->replyHeaders['content-length'])) { throw new SystemException('Body length does not match length given in header'); } }