From 2c043824a87ae6598ba6bdbe0e1d0d6a77d8b7d0 Mon Sep 17 00:00:00 2001 From: printempw Date: Sun, 27 Mar 2016 11:00:17 +0800 Subject: [PATCH] forwarded setting png header to method --- get.php | 3 +-- libraries/User.class.php | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/get.php b/get.php index 3a3920b4..dbf0e760 100644 --- a/get.php +++ b/get.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-02-02 20:56:42 * @Last Modified by: printempw - * @Last Modified time: 2016-03-26 22:28:22 + * @Last Modified time: 2016-03-27 10:57:45 * * All textures requests of legacy link will be handle here. */ @@ -27,7 +27,6 @@ if (isset($_GET['type']) && isset($_GET['uname'])) { if ($if_modified_since >= $user->getLastModified()) { header('HTTP/1.0 304 Not Modified'); } else { - header('Content-Type: image/png'); if ($_GET['type'] == "cape") { echo $user->getBinaryTexture('cape'); } else { diff --git a/libraries/User.class.php b/libraries/User.class.php index 5e521edc..f2954c04 100644 --- a/libraries/User.class.php +++ b/libraries/User.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-16 23:01:33 * @Last Modified by: printempw - * @Last Modified time: 2016-03-26 22:28:23 + * @Last Modified time: 2016-03-27 10:58:10 */ use Database\Database; @@ -106,6 +106,7 @@ class User if ($this->getTexture($type) != "") { $filename = "./textures/".$this->getTexture($type); if (file_exists($filename)) { + header('Content-Type: image/png'); // Cache friendly header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->getLastModified()).' GMT'); header('Content-Length: '.filesize($filename));