Apply patches sent by Harlow Solutions -- for WebCit
[citadel.git] / webcit / static.c
index ccae7d2974b2cff098bd9669684d649d1a9b082d..e729d74796b723122cd49cd7099e53facb411b35 100644 (file)
@@ -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);