summaryrefslogtreecommitdiff
path: root/package/uhttpd
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-09-04 10:21:05 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-09-04 10:21:05 +0000
commita6c02f8912c17c8c74b5435bdaa8691fff92494c (patch)
tree17ce8add1def05f0c1badb31fe592fe2faf5704e /package/uhttpd
parentf24b8561d492374129465492f6b35a99d5e2016f (diff)
downloadmtk-20170518-a6c02f8912c17c8c74b5435bdaa8691fff92494c.zip
mtk-20170518-a6c02f8912c17c8c74b5435bdaa8691fff92494c.tar.gz
mtk-20170518-a6c02f8912c17c8c74b5435bdaa8691fff92494c.tar.bz2
uhttpd: properly match mimetype entries which cover the whole filename (#8236)
SVN-Revision: 28160
Diffstat (limited to 'package/uhttpd')
-rw-r--r--package/uhttpd/Makefile2
-rw-r--r--package/uhttpd/src/uhttpd-file.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile
index 93ac8cf..5fa12fc 100644
--- a/package/uhttpd/Makefile
+++ b/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 := \
diff --git a/package/uhttpd/src/uhttpd-file.c b/package/uhttpd/src/uhttpd-file.c
index fda86d7..816a691 100644
--- a/package/uhttpd/src/uhttpd-file.c
+++ b/package/uhttpd/src/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--;