if (debug) log_d("D get_mime");
static int get_mime(struct request *r, const char *s){	struct mime *m;	char *saved_type;	int saved_class;	int l, le, lm;	if (debug)		log_d("D get_mime");	saved_type = 0;	saved_class = 0;	lm = 0;	l = strlen(s);	m = r->c->mimes;	while (m) {		if (m->ext) {			le = strlen(m->ext);			if (le > lm && le <= l && !strcasecmp(s + l - le, m->ext)) {				lm = le;				saved_type = m->name;				saved_class = m->class;			}		} else if (saved_type == 0) {			saved_type = m->name;			saved_class = m->class;		}		m = m->next;	}	if (saved_type) {		r->content_type = saved_type;		r->class = saved_class;		r->num_content = lm;		return 0;	}	return -1;}