mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-12 19:33:03 +00:00
Fixed problems with favicon.ico
SVN revision: 1115
This commit is contained in:
parent
b3d82d84de
commit
579922ccc7
16
src/elogd.c
16
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.502 2004/10/26 20:37:24 midas
|
||||||
|
Fixed problems with favicon.ico
|
||||||
|
|
||||||
Revision 1.501 2004/10/26 19:13:14 midas
|
Revision 1.501 2004/10/26 19:13:14 midas
|
||||||
Implemented 'RSS Entries'
|
Implemented 'RSS Entries'
|
||||||
|
|
||||||
@ -899,7 +902,7 @@ struct {
|
|||||||
".GZ", "application/x-gzip"}, {
|
".GZ", "application/x-gzip"}, {
|
||||||
".HTM", "text/html"}, {
|
".HTM", "text/html"}, {
|
||||||
".HTML", "text/html"}, {
|
".HTML", "text/html"}, {
|
||||||
".ICO", "text/plain"}, {
|
".ICO", "image/x-icon"}, {
|
||||||
".JPEG", "image/jpeg"}, {
|
".JPEG", "image/jpeg"}, {
|
||||||
".JPG", "image/jpeg"}, {
|
".JPG", "image/jpeg"}, {
|
||||||
".JS", "application/x-javascript"}, {
|
".JS", "application/x-javascript"}, {
|
||||||
@ -6704,9 +6707,12 @@ void send_file_direct(char *file_name)
|
|||||||
if (!getcfg("global", "charset", charset, sizeof(charset)))
|
if (!getcfg("global", "charset", charset, sizeof(charset)))
|
||||||
strcpy(charset, "iso-8859-1");
|
strcpy(charset, "iso-8859-1");
|
||||||
|
|
||||||
if (filetype[i].ext[0])
|
if (filetype[i].ext[0]) {
|
||||||
rsprintf("Content-Type: %s;charset=%s\r\n", filetype[i].type, charset);
|
if (strncmp(filetype[i].type, "text", 4) == 0)
|
||||||
else if (is_ascii(file_name))
|
rsprintf("Content-Type: %s;charset=%s\r\n", filetype[i].type, charset);
|
||||||
|
else
|
||||||
|
rsprintf("Content-Type: %s\r\n", filetype[i].type);
|
||||||
|
} else if (is_ascii(file_name))
|
||||||
rsprintf("Content-Type: text/plain;charset=%s\r\n", charset);
|
rsprintf("Content-Type: text/plain;charset=%s\r\n", charset);
|
||||||
else
|
else
|
||||||
rsprintf("Content-Type: application/octet-stream;charset=%s\r\n", charset);
|
rsprintf("Content-Type: application/octet-stream;charset=%s\r\n", charset);
|
||||||
@ -20247,7 +20253,7 @@ void server_loop(void)
|
|||||||
if (logbook[0] && *p == ' ') {
|
if (logbook[0] && *p == ' ') {
|
||||||
if (!strstr(logbook, ".css") && !strstr(logbook, ".htm")
|
if (!strstr(logbook, ".css") && !strstr(logbook, ".htm")
|
||||||
&& !strstr(logbook, ".gif") && !strstr(logbook, ".jpg")
|
&& !strstr(logbook, ".gif") && !strstr(logbook, ".jpg")
|
||||||
&& !strstr(logbook, ".png")) {
|
&& !strstr(logbook, ".png") && !strstr(logbook, ".ico")) {
|
||||||
sprintf(str, "%s/", logbook_enc);
|
sprintf(str, "%s/", logbook_enc);
|
||||||
redirect(NULL, str);
|
redirect(NULL, str);
|
||||||
goto redir;
|
goto redir;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user