mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
uhttpd: properly match mimetype entries which cover the whole filename (#8236)
SVN-Revision: 28160
This commit is contained in:
parent
f24b8561d4
commit
a6c02f8912
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=uhttpd
|
PKG_NAME:=uhttpd
|
||||||
PKG_RELEASE:=25
|
PKG_RELEASE:=26
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
PKG_CONFIG_DEPENDS := \
|
PKG_CONFIG_DEPENDS := \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* uhttpd - Tiny single-threaded httpd - Static file handler
|
* 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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 )
|
while( e >= path )
|
||||||
{
|
{
|
||||||
if( (*e == '.') && !strcasecmp(&e[1], m->extn) )
|
if( (*e == '.' || *e == '/') && !strcasecmp(&e[1], m->extn) )
|
||||||
return m->mime;
|
return m->mime;
|
||||||
|
|
||||||
e--;
|
e--;
|
||||||
|
Loading…
Reference in New Issue
Block a user