forwarded setting png header to method
This commit is contained in:
parent
5ac2de58f3
commit
2c043824a8
3
get.php
3
get.php
|
|
@ -3,7 +3,7 @@
|
||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-02-02 20:56:42
|
* @Date: 2016-02-02 20:56:42
|
||||||
* @Last Modified by: printempw
|
* @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.
|
* 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()) {
|
if ($if_modified_since >= $user->getLastModified()) {
|
||||||
header('HTTP/1.0 304 Not Modified');
|
header('HTTP/1.0 304 Not Modified');
|
||||||
} else {
|
} else {
|
||||||
header('Content-Type: image/png');
|
|
||||||
if ($_GET['type'] == "cape") {
|
if ($_GET['type'] == "cape") {
|
||||||
echo $user->getBinaryTexture('cape');
|
echo $user->getBinaryTexture('cape');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-01-16 23:01:33
|
* @Date: 2016-01-16 23:01:33
|
||||||
* @Last Modified by: printempw
|
* @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;
|
use Database\Database;
|
||||||
|
|
@ -106,6 +106,7 @@ class User
|
||||||
if ($this->getTexture($type) != "") {
|
if ($this->getTexture($type) != "") {
|
||||||
$filename = "./textures/".$this->getTexture($type);
|
$filename = "./textures/".$this->getTexture($type);
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
|
header('Content-Type: image/png');
|
||||||
// Cache friendly
|
// Cache friendly
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->getLastModified()).' GMT');
|
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $this->getLastModified()).' GMT');
|
||||||
header('Content-Length: '.filesize($filename));
|
header('Content-Length: '.filesize($filename));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user