*** src/modules/standard/mod_mime.c Sun Aug 31 16:41:41 2003 --- src/modules/standard/mod_mime.c.new Tue Feb 24 15:40:46 2004 *************** *** 618,624 **** mime_dir_config *conf; array_header *exception_list; const char *fn; ! char *ext; const char *type; const char *charset = NULL; int found_metadata = 0; --- 618,624 ---- mime_dir_config *conf; array_header *exception_list; const char *fn; ! char *ext, *lastext = NULL; const char *type; const char *charset = NULL; int found_metadata = 0; *************** *** 652,657 **** --- 652,659 ---- while ((ext = ap_getword(r->pool, &fn, '.')) && *ext) { int found = 0; + lastext = ext; + /* Check for Content-Type */ if ((type = ap_table_get(conf->forced_types, ext)) || (type = ap_table_get(hash_buckets[hash(*ext)], ext))) { *************** *** 687,705 **** found = 1; } - /* Check for a special handler, but not for proxy request */ - if ((type = ap_table_get(conf->handlers, ext)) - && r->proxyreq == NOT_PROXY) { - r->handler = type; - found = 1; - } - if (found) found_metadata = 1; else *((const char **) ap_push_array(exception_list)) = ext; } /* Need to see a notes entry on r for unrecognized elements. * Somebody better claim them! If we did absolutly nothing, * skip the notes to alert mod_negotiation we are clueless. --- 689,707 ---- found = 1; } if (found) found_metadata = 1; else *((const char **) ap_push_array(exception_list)) = ext; } + /* Check for a special handler, but not for proxy request */ + if (lastext && (type = ap_table_get(conf->handlers, lastext)) + && r->proxyreq == NOT_PROXY) { + r->handler = type; + found_metadata = 1; + } + /* Need to see a notes entry on r for unrecognized elements. * Somebody better claim them! If we did absolutly nothing, * skip the notes to alert mod_negotiation we are clueless.