summaryrefslogtreecommitdiffstats
path: root/src/httpd.c
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-07-06 19:28:13 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2022-07-06 19:28:13 +0200
commit3017f704d92190967815066ae686354fd5bf4edc (patch)
treeb3c14a2d57bc3f696dea72b233e6ceb65cec7316 /src/httpd.c
parent0.0.22 (diff)
downloadsear.c-3017f704d92190967815066ae686354fd5bf4edc.tar
sear.c-3017f704d92190967815066ae686354fd5bf4edc.tar.gz
sear.c-3017f704d92190967815066ae686354fd5bf4edc.tar.bz2
sear.c-3017f704d92190967815066ae686354fd5bf4edc.tar.lz
sear.c-3017f704d92190967815066ae686354fd5bf4edc.tar.xz
sear.c-3017f704d92190967815066ae686354fd5bf4edc.tar.zst
sear.c-3017f704d92190967815066ae686354fd5bf4edc.zip
Diffstat (limited to 'src/httpd.c')
-rw-r--r--src/httpd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/httpd.c b/src/httpd.c
index efebd75..abe025a 100644
--- a/src/httpd.c
+++ b/src/httpd.c
@@ -149,8 +149,8 @@ enum MHD_Result sc_httpd (void * cls,
content_type = "text/plain";
break;
case 'o': /* osdd.xml - opensearch description document */
- response = malloc(strlen(sc_osdd)+strlen(host));
- sprintf(response, sc_osdd, host);
+ response = malloc(strlen(sc_osdd)+strlen(host)*3);
+ sprintf(response, sc_osdd, host, host, host);
content_type = "application/opensearchdescription+xml";
break;
case 'c': /* css.css - stylesheets */
@@ -158,6 +158,11 @@ enum MHD_Result sc_httpd (void * cls,
response = sc_css;
content_type = "text/css";
break;
+ case 'f': /* favicon.ico */
+ mhdrmm = MHD_RESPMEM_PERSISTENT;
+ response = (char *) sc_ico;
+ content_type = "image/x-icon";
+ break;
case 'l': /* logs.html */
{
#ifdef SC_LOGMEM