minor comments and stuff
[citadel.git] / webcit / static.c
index ccae7d2974b2cff098bd9669684d649d1a9b082d..7a12b4d0e4d70429d2dd3a4452a2c2e8831a56d1 100644 (file)
@@ -14,7 +14,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include "webcit.h"
-#include "webserver.h"
+
 
 unsigned char OnePixelGif[37] = {
                0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x01, 0x00,
@@ -45,7 +45,12 @@ void output_static(char *prefix) {
        int len;
        const char *Err;
        char what[SIZ];
-       snprintf(what, sizeof what, "./%s/%s", prefix, (char *)ChrPtr(WC->Hdr->HR.ReqLine));
+       if (prefix==NULL) {
+               // Force blank.gif  Overrides the request line.
+               strcpy(what,"./static/webcit_icons/blank.gif");
+       } else {
+               snprintf(what, sizeof what, "./%s/%s", prefix, (char *)ChrPtr(WC->Hdr->HR.ReqLine));
+       }
 
        syslog(LOG_DEBUG, "output_static(%s)", what);
        len = strlen (what);