Parcourir la source

uhttpd: properly match mimetype entries which cover the whole filename (#8236)

SVN-Revision: 28160
Jo-Philipp Wich il y a 14 ans
Parent
commit
a6c02f8912
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 1
      package/uhttpd/Makefile
  2. 2 2
      package/uhttpd/src/uhttpd-file.c

+ 1 - 1
package/uhttpd/Makefile

@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uhttpd
-PKG_RELEASE:=25
+PKG_RELEASE:=26
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 PKG_CONFIG_DEPENDS := \

+ 2 - 2
package/uhttpd/src/uhttpd-file.c

@@ -1,7 +1,7 @@
 /*
  * uhttpd - Tiny single-threaded httpd - Static file handler
  *
- *   Copyright (C) 2010 Jo-Philipp Wich <[email protected]>
+ *   Copyright (C) 2010-2011 Jo-Philipp Wich <[email protected]>
  *
  *  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--;