From 26a987c98d442ec93a099ecd2a040e9bb5497f56 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Thu, 3 Feb 2022 15:24:37 -0600 Subject: [PATCH] Fix content type on webp --- .../src/main/resources/extracted/web/standalone/MySQL_tiles.php | 2 ++ .../resources/extracted/web/standalone/PostgreSQL_tiles.php | 2 ++ .../main/resources/extracted/web/standalone/SQLite_tiles.php | 2 ++ .../src/main/resources/extracted/web/standalone/tiles.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php b/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php index b26df7a9..f419218e 100644 --- a/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php +++ b/DynmapCore/src/main/resources/extracted/web/standalone/MySQL_tiles.php @@ -88,6 +88,8 @@ $stmt->bind_result($tnewimage, $timage, $format, $thash, $tlast); if ($stmt->fetch()) { if ($format == 0) { header('Content-Type: image/png'); + } else if ($format == 2) { + header('Content-Type: image/webp'); } else { header('Content-Type: image/jpeg'); } diff --git a/DynmapCore/src/main/resources/extracted/web/standalone/PostgreSQL_tiles.php b/DynmapCore/src/main/resources/extracted/web/standalone/PostgreSQL_tiles.php index 752e977d..5afd0338 100644 --- a/DynmapCore/src/main/resources/extracted/web/standalone/PostgreSQL_tiles.php +++ b/DynmapCore/src/main/resources/extracted/web/standalone/PostgreSQL_tiles.php @@ -93,6 +93,8 @@ list($timage, $format, $thash, $tlast) = $stmt->fetch(); if ($res && $timage) { if ($format == 0) { header('Content-Type: image/png'); + } else if ($format == 2) { + header('Content-Type: image/webp'); } else { header('Content-Type: image/jpeg'); } diff --git a/DynmapCore/src/main/resources/extracted/web/standalone/SQLite_tiles.php b/DynmapCore/src/main/resources/extracted/web/standalone/SQLite_tiles.php index bd034583..909cf5a7 100644 --- a/DynmapCore/src/main/resources/extracted/web/standalone/SQLite_tiles.php +++ b/DynmapCore/src/main/resources/extracted/web/standalone/SQLite_tiles.php @@ -89,6 +89,8 @@ if (isset($row[1])) { $format = $row[1]; if ($format == 0) { header('Content-Type: image/png'); + } else if ($format == 2) { + header('Content-Type: image/webp'); } else { header('Content-Type: image/jpeg'); } diff --git a/DynmapCore/src/main/resources/extracted/web/standalone/tiles.php b/DynmapCore/src/main/resources/extracted/web/standalone/tiles.php index a82f4886..fdcf8c6d 100644 --- a/DynmapCore/src/main/resources/extracted/web/standalone/tiles.php +++ b/DynmapCore/src/main/resources/extracted/web/standalone/tiles.php @@ -74,6 +74,8 @@ if (strstr($path, ".png")) { header("Content-Type: image/png"); } elseif (strstr($path, ".jpg")) { header("Content-Type: image/jpeg"); +} elseif (strstr($path, ".webp")) { + header("Content-Type: image/webp"); } else { header("Content-Type: application/text"); }