summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-09-04 10:21:05 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-09-04 10:21:05 +0000
commit594916de39c0cb5df48321364be17ea6b95e20a0 (patch)
tree37aa47dbc7305b17ca9aab6d58c8407014881c93
parent7966b3d147529aee7e87f0064b36061475fd1964 (diff)
downloaduhttpd-594916de39c0cb5df48321364be17ea6b95e20a0.tar.gz
[package] uhttpd: properly match mimetype entries which cover the whole filename (#8236)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/package/uhttpd/src@28160 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--uhttpd-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uhttpd-file.c b/uhttpd-file.c
index fda86d7..816a691 100644
--- a/uhttpd-file.c
+++ b/uhttpd-file.c
@@ -1,7 +1,7 @@
/*
* uhttpd - Tiny single-threaded httpd - Static file handler
*
- * Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
+ * Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ static const char * uh_file_mime_lookup(const char *path)
while( e >= path )
{
- if( (*e == '.') && !strcasecmp(&e[1], m->extn) )
+ if( (*e == '.' || *e == '/') && !strcasecmp(&e[1], m->extn) )
return m->mime;
e--;