diff options
author | Andrew Dolgov <[email protected]> | 2020-09-15 06:53:17 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-15 06:53:17 +0300 |
commit | 027b9cd6b23cb35a39491a6df35fc8e7046bad4e (patch) | |
tree | 1eeacc5b19d383b9e220ed88c4c4d7773180a357 | |
parent | 47a8820e212eb0661c83b238f50ff4929aaed087 (diff) |
report errors in plain text
-rw-r--r-- | init.php | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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"; } } } |