summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-15 06:53:17 +0300
committerAndrew Dolgov <[email protected]>2020-09-15 06:53:17 +0300
commit027b9cd6b23cb35a39491a6df35fc8e7046bad4e (patch)
tree1eeacc5b19d383b9e220ed88c4c4d7773180a357
parent47a8820e212eb0661c83b238f50ff4929aaed087 (diff)
report errors in plain text
-rw-r--r--init.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/init.php b/init.php
index 5bb7a9a..8171189 100644
--- a/init.php
+++ b/init.php
@@ -202,14 +202,13 @@ class Api_Resize_Media extends Plugin {
imagedestroy($img);
} else {
- header("Content-type: text/html");
+ header("Content-type: text/plain");
http_response_code(400);
- print "<h1>Proxy request failed.</h1>";
- print "<p>Fetch error $fetch_last_error ($fetch_last_error_code)</p>";
- print "<p>URL: $url</p>";
- print "<textarea cols='80' rows='25'>" . htmlspecialchars($fetch_last_error_content) . "</textarea>";
+ print "Proxy request failed.\n".
+ "Fetch error $fetch_last_error ($fetch_last_error_code)\n".
+ "Requested URL: $url";
}
}
}