summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/afb-hreq.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e78d0323..0780cb4a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,6 +23,7 @@ endif(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
INCLUDE(FindPkgConfig)
ADD_DEFINITIONS(-DBINDING_INSTALL_DIR="${binding_install_dir}")
+ADD_DEFINITIONS(-DINFER_EXTENSION)
CHECK_INCLUDE_FILES(magic.h HAVE_MAGIC_H)
CHECK_LIBRARY_EXISTS(magic magic_load "" HAVE_LIBMAGIC_SO)
@@ -36,7 +37,7 @@ IF(NOT HAVE_LIBMAGIC)
MESSAGE(FATAL_ERROR "\"magic.h\" or \"libmagic.so\" missing.
Please install the \"file-devel\" or \"libmagic-dev\" package !")
ENDIF(NOT HAVE_LIBMAGIC)
-ADD_COMPILE_OPTIONS(-DUSE_MAGIC_MIME_TYPE)
+ADD_DEFINITIONS(-DUSE_MAGIC_MIME_TYPE)
PKG_CHECK_MODULES(libsystemd REQUIRED libsystemd>=222)
PKG_CHECK_MODULES(libmicrohttpd REQUIRED libmicrohttpd>=0.9.48)
diff --git a/src/afb-hreq.c b/src/afb-hreq.c
index b2180458..5052cca9 100644
--- a/src/afb-hreq.c
+++ b/src/afb-hreq.c
@@ -280,6 +280,10 @@ static const char *mimetype_fd_name(int fd, const char *filename)
{ ".js", "text/javascript" },
{ ".html", "text/html" },
{ ".css", "text/css" },
+ { ".ico", "image/x-icon"},
+ { ".png", "image/png" },
+ { ".svg", "image/svg+xml" },
+ { ".ttf", "application/x-font-ttf"},
{ NULL, NULL }
};
int i = 0;