summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
68a8eaa)
Change-Id: Ic772bf327b45f4ad74095d57a8e29a28663aa3d0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
* limitations under the License.
*/
* limitations under the License.
*/
-#define USE_MAGIC_MIME_TYPE
#define _GNU_SOURCE
#include <stdlib.h>
#define _GNU_SOURCE
#include <stdlib.h>
-#if defined(USE_MAGIC_MIME_TYPE)
-
-#if !defined(MAGIC_DB)
-#define MAGIC_DB "/usr/share/misc/magic.mgc"
-#endif
-
static void afb_hreq_reply_v(struct afb_hreq *hreq, unsigned status, struct MHD_Response *response, va_list args)
{
char *cookie;
static void afb_hreq_reply_v(struct afb_hreq *hreq, unsigned status, struct MHD_Response *response, va_list args)
{
char *cookie;
+#if defined(USE_MAGIC_MIME_TYPE)
+
+#if !defined(MAGIC_DB)
+#define MAGIC_DB "/usr/share/misc/magic.mgc"
+#endif
+
static magic_t lazy_libmagic()
{
static int done = 0;
static magic_t lazy_libmagic()
{
static int done = 0;
const char *extension = strrchr(filename, '.');
if (extension) {
static const char *const known[][2] = {
const char *extension = strrchr(filename, '.');
if (extension) {
static const char *const known[][2] = {
- { ".js", "text/javascript" },
+ { ".js", "text/javascript" },
{ ".html", "text/html" },
{ ".html", "text/html" },
+ { ".css", "text/css" },
{ NULL, NULL }
};
int i = 0;
{ NULL, NULL }
};
int i = 0;