when HTTP_REQUEST {
# error condition was true, so respond back to client with html or image(s)
switch [string tolower [HTTP::path]] {
/image.png {
HTTP::respond 200 content [b64decode \
"R0lGODlhfgAHAJH/AP///wAAAMDAwAAAACH5BAEA\
AAIALAAAAAB+AAcAQAIvhI+hy+0Po5y0BoSz3sn6\
D4YTR5adiKYqZLbcCseoS2PyjY/1nve+suP9hrJg\
pgAAOw=="] "Content-Type" "image/png"}
default {
HTTP::respond 200 content "<html><title>Error</title><body>Error!<img src=/image.png></body></html>"}
}
}
给用户返回一个带图片的维护提示~
base64 encoded it using an online tool (Click here
文章评论