r4351 explain the specifics of "image" module
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 17 Mar 2011 11:27:13 +0000 (11:27 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 17 Mar 2011 11:27:13 +0000 (11:27 +0000)
wwwroot/index.php

index c74720e5f18bbd8179949aeda19b06a0eab681bb..235a1adc43b41d6c5ceb543dab551c1522583fe2 100644 (file)
@@ -64,6 +64,12 @@ try {
                echo $file['contents'];
                break;
        case 'image' == $_REQUEST['module']:
+               # The difference between "image" and "download" ways to serve the same
+               # picture file is that the former is used in <IMG SRC=...> construct,
+               # and the latter is accessed as a standalone URL and can reply with any
+               # Content-type. Hence "image" module indicates failures with internally
+               # built images, and "download" can return a full-fledged "permission
+               # denied" or "exception" HTML page instead of the file requested.
                require_once 'inc/init.php'; // for authentication check
                // 'progressbar's never change, attempt an IMS shortcut before loading init.php
                if (@$_REQUEST['img'] == 'progressbar')