#include "webcit.h"
#include "groupdav.h"
#include "webserver.h"
-#include "mime_parser.h"
#include <stdio.h>
#include <stdarg.h>
void urlesc(char *outbuf, char *strbuf)
{
int a, b, c, len, eclen, olen;
- char *ec = " #&;`'|*?-~<>^()[]{}/$\"\\";
+ char *ec = " +#&;`'|*?-~<>^()[]{}/$\"\\";
strcpy(outbuf, "");
len = strlen(strbuf);
wprintf("Content-type: text/html; charset=utf-8\r\n"
"Server: %s / %s\n"
"Connection: close\r\n",
- SERVER, serv_info.serv_software
+ PACKAGE_STRING, serv_info.serv_software
);
}
"Server: %s\r\n"
"Connection: close\r\n",
content_type,
- SERVER);
+ PACKAGE_STRING);
#ifdef HAVE_ZLIB
/** If we can send the data out compressed, please do so. */
* Instead of an ugly 404, send a 1x1 transparent GIF
* when there's no such image on the server.
*/
- output_static("static/blank.gif");
+ char blank_gif[SIZ];
+ snprintf (blank_gif, SIZ, "%s%s", static_dirs[0], "/blank.gif");
+ output_static(blank_gif);
}
"Cache-Control: no-cache\r\n"
"Expires: -1\r\n"
,
- SERVER);
+ PACKAGE_STRING);
begin_burst();
}
wprintf("HTTP/1.1 404 Security check failed\r\n");
wprintf("Content-Type: text/plain\r\n");
wprintf("\r\n");
- wprintf("Security check failed.\r\n");
+ wprintf("You have sent a malformed or invalid request.\r\n");
}
goto SKIP_ALL_THIS_CRAP; /* Don't try to connect */
}
begin_ajax_response();
calendar_section();
end_ajax_response();
+ } else if (!strcasecmp(action, "mini_calendar")) {
+ begin_ajax_response();
+ ajax_mini_calendar();
+ end_ajax_response();
} else if (!strcasecmp(action, "iconbar_ajax_menu")) {
begin_ajax_response();
do_iconbar();
}
}
+/**
+ * \brief Replacement for sleep() that uses select() in order to avoid SIGALRM
+ * \param seconds how many seconds should we sleep?
+ */
+void sleeeeeeeeeep(int seconds)
+{
+ struct timeval tv;
+
+ tv.tv_sec = seconds;
+ tv.tv_usec = 0;
+ select(0, NULL, NULL, NULL, &tv);
+}
+
/*@}*/