diff --git a/ChangeLog b/ChangeLog index 0bcf3f6f5d..93b2186064 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ phpMyAdmin - ChangeLog 4.6.4 (not yet released) - issue Include X-Robots-Tag header in responses - issue Enfornce numeric field length when creating table +- issue Fixed invalid Content-Length in some HTTP responses 4.6.3 (2016-06-23) - issue #12249 Fixed cookie path on Windows diff --git a/libraries/DisplayResults.php b/libraries/DisplayResults.php index ac468155ff..a6f72d39c6 100644 --- a/libraries/DisplayResults.php +++ b/libraries/DisplayResults.php @@ -5263,7 +5263,7 @@ class DisplayResults if (isset($content)) { - $size = mb_strlen($content, '8bit'); + $size = strlen($content); $display_size = Util::formatByteDown($size, 3, 1); $result .= ' - ' . $display_size[0] . ' ' . $display_size[1]; diff --git a/libraries/Linter.php b/libraries/Linter.php index 5d0dd49515..422141e615 100644 --- a/libraries/Linter.php +++ b/libraries/Linter.php @@ -38,7 +38,7 @@ class Linter $str = new UtfString($str); } - // The reason for using the '8bit' parameter is that the length + // The reason for using the strlen is that the length // required is the length in bytes, not characters. // // Given the following string: `????+`, where `?` represents a @@ -51,7 +51,7 @@ class Linter // (which is actually a new line) aren't going to be processed at // all. $len = ($str instanceof UtfString) ? - $str->length() : mb_strlen($len, '8bit'); + $str->length() : strlen($len); $lines = array(0); for ($i = 0; $i < $len; ++$i) { diff --git a/libraries/PDF.php b/libraries/PDF.php index 3f7bad725e..efe9abfef3 100644 --- a/libraries/PDF.php +++ b/libraries/PDF.php @@ -141,7 +141,7 @@ class PDF extends TCPDF PMA_downloadHeader( $filename, 'application/pdf', - mb_strlen($pdfData) + strlen($pdfData) ); echo $pdfData; } diff --git a/libraries/plugins/auth/AuthenticationCookie.php b/libraries/plugins/auth/AuthenticationCookie.php index ddbf8fcddc..158983a4ac 100644 --- a/libraries/plugins/auth/AuthenticationCookie.php +++ b/libraries/plugins/auth/AuthenticationCookie.php @@ -687,7 +687,7 @@ class AuthenticationCookie extends AuthenticationPlugin true ); } - if (mb_strlen($this->_cookie_iv, '8bit') < $this->getIVSize()) { + if (strlen($this->_cookie_iv) < $this->getIVSize()) { $this->createIV(); } diff --git a/libraries/plugins/schema/dia/Dia.php b/libraries/plugins/schema/dia/Dia.php index f6793d400a..4aad6e067f 100644 --- a/libraries/plugins/schema/dia/Dia.php +++ b/libraries/plugins/schema/dia/Dia.php @@ -181,7 +181,7 @@ class Dia extends XMLWriter PMA_downloadHeader( $fileName, 'application/x-dia-diagram', - mb_strlen($output) + strlen($output) ); print $output; } diff --git a/libraries/plugins/schema/eps/Eps.php b/libraries/plugins/schema/eps/Eps.php index 42ec3a0171..de39521d6f 100644 --- a/libraries/plugins/schema/eps/Eps.php +++ b/libraries/plugins/schema/eps/Eps.php @@ -270,7 +270,7 @@ class Eps PMA_downloadHeader( $fileName, 'image/x-eps', - mb_strlen($output) + strlen($output) ); print $output; } diff --git a/libraries/plugins/schema/svg/Svg.php b/libraries/plugins/schema/svg/Svg.php index d7a4cc9358..0ea3c90adf 100644 --- a/libraries/plugins/schema/svg/Svg.php +++ b/libraries/plugins/schema/svg/Svg.php @@ -193,7 +193,7 @@ class Svg extends XMLWriter PMA_downloadHeader( $fileName, 'image/svg+xml', - mb_strlen($output) + strlen($output) ); print $output; } diff --git a/libraries/tracking.lib.php b/libraries/tracking.lib.php index 71e1a262c0..785c6fa8f1 100644 --- a/libraries/tracking.lib.php +++ b/libraries/tracking.lib.php @@ -1202,7 +1202,7 @@ function PMA_exportAsFileDownload($entries) PMA_downloadHeader( $filename, 'text/x-sql', - mb_strlen($dump) + strlen($dump) ); echo $dump; diff --git a/tbl_get_field.php b/tbl_get_field.php index 3e21c870aa..95f8b67b43 100644 --- a/tbl_get_field.php +++ b/tbl_get_field.php @@ -52,6 +52,6 @@ if ($result === false) { PMA_downloadHeader( $table . '-' . $_GET['transform_key'] . '.bin', PMA_detectMIME($result), - mb_strlen($result, '8bit') + strlen($result) ); echo $result;