[backfire] uhttpd: merge r30806
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 4 Mar 2012 15:54:55 +0000 (15:54 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 4 Mar 2012 15:54:55 +0000 (15:54 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@30807 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/uhttpd/Makefile
package/uhttpd/src/uhttpd.c

index 1020692a6c83bfd1fd2d8a34aed03b8638f77128..66359d28467093f7990ad6e6c4ab2497234938bd 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2011 Jo-Philipp Wich <xm@subsignal.org>
+# Copyright (C) 2010-2012 Jo-Philipp Wich <xm@subsignal.org>
 #
 # 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 := \
index 3563d91d16ef92ad12ed55cae69b410cc5aa2e84..9b9608628d4d393dc654bfbe966d5bdc17cb48a7 100644 (file)
@@ -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 */