Fix content length check in HTTPRequest.class.php
authorTim Düsterhus <timwolla@googlemail.com>
Thu, 20 Mar 2014 23:51:08 +0000 (00:51 +0100)
committerTim Düsterhus <timwolla@googlemail.com>
Thu, 20 Mar 2014 23:51:08 +0000 (00:51 +0100)
wcfsetup/install/files/lib/util/HTTPRequest.class.php

index fc3b61f8d4de1a89d859545428b065d441ae6000..a0257f9ccd44529eea64a8f850937c46af8f76e1 100644 (file)
@@ -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');
                        }
                }