changeset 1721:8a4b1d7c0b0d

clearer msg when can't display something as image
author corvid <corvid@lavabit.com>
date Fri, 15 Oct 2010 19:33:01 +0000
parents d9765916771e
children b0f4bd357814
files src/web.cc
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/web.cc	Fri Oct 15 11:37:44 2010 +0200
+++ b/src/web.cc	Fri Oct 15 19:33:01 2010 +0000
@@ -89,12 +89,12 @@
 
    } else {
       /* A non-RootUrl. At this moment we only handle image-children */
-      if (!dStrncasecmp(Type, "image/", 6))
+      if (!dStrncasecmp(Type, "image/", 6)) {
          dw = (Widget*) a_Mime_set_viewer(Type, Web, Call, Data);
-   }
-
-   if (!dw) {
-      MSG_HTTP("unhandled MIME type: \"%s\"\n", Type);
+      } else {
+         MSG_HTTP("'%s' cannot be displayed as image; has media type '%s'\n",
+                  URL_STR(Web->url), Type);
+      }
    }
    return (dw ? 1 : -1);
 }