X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fstatic.c;h=34a656ee2b6058ed3203c4fc5d70cf9ad816dd98;hb=HEAD;hp=ccae7d2974b2cff098bd9669684d649d1a9b082d;hpb=316f01d07e6e7b5f50e5b6f210ebd6098a1a4fb2;p=citadel.git diff --git a/webcit/static.c b/webcit/static.c index ccae7d297..7a12b4d0e 100644 --- a/webcit/static.c +++ b/webcit/static.c @@ -14,7 +14,7 @@ #include #include #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);