From 8009cc11264a3b44c7a2bd782af1b7c80662e9dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 21 Mar 2014 00:51:08 +0100 Subject: [PATCH] Fix content length check in HTTPRequest.class.php --- wcfsetup/install/files/lib/util/HTTPRequest.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); } } -- 2.20.1