diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-04 10:21:05 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-09-04 10:21:05 +0000 |
commit | 04314394a1fd4ae5ed180d347dca5cfc8ad436bf (patch) | |
tree | 61464fa49886b65b0c479e0ff9c549e49c6e0dfb /package | |
parent | 6f4598372652d6019e1c2d3a774f0a2606c6503f (diff) | |
download | master-187ad058-04314394a1fd4ae5ed180d347dca5cfc8ad436bf.tar.gz master-187ad058-04314394a1fd4ae5ed180d347dca5cfc8ad436bf.tar.bz2 master-187ad058-04314394a1fd4ae5ed180d347dca5cfc8ad436bf.zip |
[package] uhttpd: properly match mimetype entries which cover the whole filename (#8236)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28160 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/uhttpd/Makefile | 2 | ||||
-rw-r--r-- | package/uhttpd/src/uhttpd-file.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile index 93ac8cf03e..5fa12fc8bc 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 fda86d7263..816a69124e 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--; |