From: Jo-Philipp Wich Date: Sun, 4 Mar 2012 15:54:55 +0000 (+0000) Subject: uhttpd: merge r30806 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cf192b608f59a63647ded6d44b7bc593a02cc641;p=openwrt%2Fsvn-archive%2Fopenwrt.git uhttpd: merge r30806 SVN-Revision: 30807 --- diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile index 1020692a6c..66359d2846 100644 --- a/package/uhttpd/Makefile +++ b/package/uhttpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2011 Jo-Philipp Wich +# Copyright (C) 2010-2012 Jo-Philipp Wich # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=28 +PKG_RELEASE:=28.1 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_CONFIG_DEPENDS := \ diff --git a/package/uhttpd/src/uhttpd.c b/package/uhttpd/src/uhttpd.c index 3563d91d16..9b9608628d 100644 --- a/package/uhttpd/src/uhttpd.c +++ b/package/uhttpd/src/uhttpd.c @@ -337,11 +337,14 @@ static struct http_request * uh_http_header_parse(struct client *cl, char *buffe } /* have name but no value and found a colon, start of value */ - else if( hdrname && !hdrdata && ((i+2) < buflen) && - (buffer[i] == ':') && (buffer[i+1] == ' ') + else if( hdrname && !hdrdata && + ((i+1) < buflen) && (buffer[i] == ':') ) { buffer[i] = 0; - hdrdata = &buffer[i+2]; + hdrdata = &buffer[i+1]; + + while ((hdrdata + 1) < (buffer + buflen) && *hdrdata == ' ') + hdrdata++; } /* have no name and found [A-Za-z], start of name */