2
0
Fork 0
lighttpd2/include/lighttpd/mimetype.h

20 lines
645 B
C
Raw Normal View History

2010-09-04 12:50:35 +00:00
#ifndef _LIGHTTPD_MIMETYPE_H_
#define _LIGHTTPD_MIMETYPE_H_
struct liMimetypeNode {
2010-09-12 13:55:45 +00:00
guchar cmin;
guchar cmax;
2010-09-04 12:50:35 +00:00
gpointer *children; /* array of either liMimetypeNode* or GString* */
GString *mimetype;
};
typedef struct liMimetypeNode liMimetypeNode;
LI_API liMimetypeNode *li_mimetype_node_new(void);
LI_API void li_mimetype_node_free(liMimetypeNode *node);
LI_API void li_mimetype_insert(liMimetypeNode *node, GString *suffix, GString *mimetype);
2010-09-04 12:50:35 +00:00
/* looks up the mimetype for a filename by comparing suffixes. longest match is returned. do not free the result */
LI_API GString *li_mimetype_get(liVRequest *vr, GString *filename);
#endif