Added magic file type detection

This commit is contained in:
lorenz.stechauner committed 2020-12-19 22:09:03 +01:00
1 parent f6ac55adaf
commit f0338209f5
8 files changed
+52 -10

No files matched your search

+23
View File
@@ -6,3 +6,26 @@
*/
#include "cache.h"
#include "uri.h"
int magic_init() {
magic = magic_open(MAGIC_MIME);
magic_load(magic, "/usr/share/misc/magic.mgc");
return 0;
}
int cache_init() {
magic_init();
return 0;
}
int uri_cache_init(http_uri *uri) {
if (uri->filename == NULL) {
return -1;
}
return 0;
}